[Mono-dev] Where can I find the offset setting place?

Pin Cheng pcheng at rocketsoftware.com
Tue Oct 18 08:29:59 UTC 2016

Hi all,
I found a test case generated IL code:
iconst r3 <- [0]
storei4_membase_reg [sp + 0x34] <- r3
add_imm r6 <- sp [0x34]
call r3 <- [r3 <- R76] [r4 <- R77] [r5 <- R78] [r6 <- R79] [r7 <- R80] [r8 <- R81] [r9 <- R82] [r10 <- R83] clobbers: c
I have traced actual executing instruction, I found that the offset 0x34 was not set correctly on my target
platform. the process is to use method to call a extern C function resides in shared library.
the signature is:
mono_test_marshal_bool_ref (int arg, unsigned int expected, unsigned int testVal, unsigned int* bDefaultMarsh,
                         unsigned int* bBoolCustMarsh, char* bI1CustMarsh, unsigned char* bU1CustMarsh,
                         unsigned short* bVBCustMarsh)

It seems that the caller function set the wrong offset (0x34) to passing arguments and callee function overwrite
the memory so that passing parameter wrong.

Please tell me where could I find the offset setting place?


Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? +1 877.328.2932 ? +1 781.577.4321
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy

This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20161018/7eb2a4d8/attachment.html>

More information about the Mono-devel-list mailing list