[Mono-dev] Parameter on the stack overlap

Zhanxing Ding zding at rocketsoftware.com
Thu May 12 09:47:18 UTC 2016


Hi all,

Now I am porting mono to aix,
I met a problem that is,
When convert from decimal to flaot, I found the parameter d of the mono_decimal_to_float (d=...)
function overlapped, so I can't get the correct content of the parameter.

Prologue of the function:

mono_decimal_to_float (d=...) at decimal-ms.c:2369(which is an Internal Call)
2369    {
=> 0x1021925c <mono_decimal_to_float+0>:        7c 08 02 a6     mflr    r0
   0x10219260 <mono_decimal_to_float+4>:        90 01 00 08     stw     r0,8(r1)
   0x10219264 <mono_decimal_to_float+8>:        93 e1 ff fc     stw     r31,-4(r1)
   0x10219268 <mono_decimal_to_float+12>:       94 21 ff a0     stwu    r1,-96(r1)
   0x1021926c <mono_decimal_to_float+16>:       7c 3f 0b 78     mr      r31,r1
   0x10219270 <mono_decimal_to_float+20>:       90 7f 00 78     stw     r3,120(r31)
   0x10219274 <mono_decimal_to_float+24>:       90 9f 00 7c     stw     r4,124(r31)
   0x10219278 <mono_decimal_to_float+28>:       90 bf 00 80     stw     r5,128(r31)
   0x1021927c <mono_decimal_to_float+32>:       90 df 00 84     stw     r6,132(r31)

Parameter d is the MonoDecimal structure,
The address is 0x2ff22700, but when run the instruction stw     r3,120(r31), one filed of  0x2ff22700  populated with
The value 0x2ff22700.

(gdb) info reg r31
r31            0x2ff22690       804398736

Anyone know why this happened?
Why it save the parameter where will overlap the value?

Thank you in advance!

================================
Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? +1 877.328.2932 ? +1 781.577.4321
Unsubscribe From Commercial Email - unsubscribe at rocketsoftware.com
Manage Your Subscription Preferences - http://info.rocketsoftware.com/GlobalSubscriptionManagementEmailFooter_SubscriptionCenter.html
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.ximian.com/pipermail/mono-devel-list/attachments/20160512/b144b1cd/attachment-0001.html>


More information about the Mono-devel-list mailing list