Open
Description
Version and Platform (required):
- Binary Ninja Version: 5.1.7409-dev
- OS: Arch Linux
- OS Version: Latest
- CPU Architecture: x64
Bug Description:
typedef struct {
void *a;
void *b;
void *c;
} obj_t;
obj_t* new_obj() {
obj_t *o = malloc(sizeof(obj_t));
o->a = malloc(0x10);
o->b = malloc(0x20);
o->c = malloc(0x30);
}
When compiled, the above code shows like this in the Pseudo-C layer:
When you try to create a structure with the default options, the lvalue on the assignment at offset 0 disappears:
However, HLIL is still rendering this correctly:
Steps To Reproduce:
- Navigate to
0x401149
- Hit
s
, thenEnter
to accept the default struct creation options - Observe that the lhs at
0x401170
disappears
Expected Behavior:
The lhs at 0x401170
should be *result
or equivalent.
Binary:
I included a test binary that repro's this, along with the source code and the bndb I screenshoted