avast / avast/retdec

Noise in output, use of magic g5

Open
#795 3 comments 0 reactions 1 assignee Claimed by @xkubov View on GitHub
C-bin2llvmir
Dominant language
C++
Stars
8.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Subject: https://github.com/rfalke/decompiler-subjects/tree/master/from_holdec/dmi/cfg/ia32_elf/subject.exe

Output
```
int32_t basic_7_for_loop(void) {
int32_t v1 = 48; // 0x80486f9
int32_t v2; // bp-12, 0x80486f0
*(int32_t *)((int32_t)&v2 - 16) = v1;
v1++;
putchar((int32_t)&g5);
while (v1 != 58) {
// 0x8048700
*(int32_t *)((int32_t)&v2 - 16) = v1;
v1++;
putchar((int32_t)&g5);
}
// 0x8048714
return 0;
}

int32_t intermediate_10_loop_with_one_break(int32_t a1) {
// 0x8048790
int32_t v1; // bp-12, 0x8048790
int32_t * v2 = (int32_t *)((int32_t)&v1 - 16); // 0x80487b3
*v2 = (int32_t)"head";
puts((char *)&g5);
*v2 = 0;
if (time(&g5) == a1) {
// 0x80487d0
return 0;
}
*v2 = (int32_t)"tail";
puts((char *)&g5);
*v2 = (int32_t)"head";
puts((char *)&g5);
*v2 = 0;
while (time(&g5) != a1) {
// 0x80487a0
*v2 = (int32_t)"tail";
puts((char *)&g5);
*v2 = (int32_t)"head";
puts((char *)&g5);
*v2 = 0;
}
// 0x80487d0
return 0;
}
```

It is also unclear from reading the output how the value of `v1` is flowing to the putchar call.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.