<div dir="ltr"><div>Hi all,</div><div>I defined new FFI-Tests with struct inside struct.</div><div>I wanted to check for correct alignment (this works as it should thanks to Ronie!).</div><div><br></div><div>But when I reload the package into a new image, there is an initialization order problem.</div><div>It seems that the struct FFITestSfd is created AFTER the struct FFITestSsSfd.</div><div>But struct FFITestSsSfd depends on struct FFITestSfd (it is just struct {short s1; struct FFITestSfd sfd2;}</div><div>Consequently, FFITestSsSfd DOES not get correctly initialized...</div><div>It simply ignore the missing FFITestSfd definition, and believes that it has a single field (short s1) and that it is of size 2...</div><div><br></div><div>When we execute the FFIPluginTests testSuite, this can badly crash the image because the FFI is allocating a ByteArray handle of size 2 for returning the FFITestSsSfd by value, and the test function writes a struct of size 12 into it...</div><div><br></div><div>We can't live long with such hanging sword above our heads and should urgently fix it.</div><div>At least, you are warned, don't execute new FFI tests blindly.<br> </div></div>