Open psifertex opened 7 months ago
The structure are created in the very same way. They look different in the types view because we did some UI hack to avoid the excessive padding in really large structs. You can test that if you create a structure >=0x400 directly, it is the same.
Does this behavior causes anything inconvenient?
This is just a consequence of the analysis.types.paddingThreshold
setting being rather low by default. Any types >= that setting are rendered in a single line for performance reasons (previous users had trouble with structures that were gigabytes in size). The default setting value of 0x400 may be a bit too low for this, given that it can trigger with very reasonably sized structs as you've noticed here. So the crux of this issue is likely just "make that setting bigger by default," as it seems to otherwise be working as intended.
Ultimately rendering it like that is actually fine visually if we fixed the fact that "create struct members referenced" feature fails to work when it's rendered like this. Don't know if that is an easy change or not though.
I might actually change the issue to reflect that is the real breaking bug.
Structures over 0x400 aren't properly created when using "s" on the call of an allocator:
Note this is especially problematic because it's extremely difficult using the UI to turn the invalid
__padding
offset back into the actual padding.(just press "s" on
x0_7
andx0_6
in the attached)sample.zip