-
I have a 0x100 byte structure defined on the stack, going from frame offset -100 to -200: Later in this function, a pointer to the middle of this struct is created and used (MLIL):
This generates awkward HLIL, where it looks like I'm reading uninit data:
I can change around the struct definition to have an element starting at offset +0xa0, but this doesn't change the output. This is one instance of this, but I'm pretty sure I've seen others similar. Is there some way I can clean up this output by undefining |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
This actually seems to be an issue in MLIL generation. There shouldn't be two variables here, and rather should be taking the address of the member in the middle of the structure. |
Beta Was this translation helpful? Give feedback.
-
Should I file a bug for this? I created a new bndb to make sure I hadn't screwed something dumb up, and instead of creating a struct I just created a uint8_t buf[0x100] on the stack:
It looks like LLIL is correct:
But, as you said, MLIL misses it somehow?
Happy to provide binaries if they'd be helpful. |
Beta Was this translation helpful? Give feedback.
-
One other thing I tried, if I create a structure that has a member that aligns to this offset, nothing changes:
LLIL
MLIL
|
Beta Was this translation helpful? Give feedback.
-
Sorry, yes, this should be a bug. 😛 We were actually just looking for it since we've got it slated for 2.1 and couldn't find it. If you don't mind creating it (or I can) this is up for relatively soonish fixing. |
Beta Was this translation helpful? Give feedback.
This actually seems to be an issue in MLIL generation. There shouldn't be two variables here, and rather should be taking the address of the member in the middle of the structure.