• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Function's default values are corrupted (Nasty bug)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function's default values are corrupted (Nasty bug)


  • Subject: Re: Function's default values are corrupted (Nasty bug)
  • From: daniel <email@hidden>
  • Date: Thu, 31 Mar 2005 20:08:35 -0800

If you can't produce a simple test case, that makes me think that in the process of reducing your code, you notice that the problem goes away. If that's true then you have a lot more information you could obtain and possibly share.

I don't know much about C++ name mangling but I did notice that passing the symbol "Lm2EE7SetSizeEmmssss" to the c++filt command line tool doesn't seem to yield a demangling. I don't know if that's because the tool is broken or if that symbol is not a valid gcc mangled symbol. Is it possible you're compiling separate source files with different versions of gcc?

By the way, you should ask permission before copying a private email message to a public list. I often phrase inquiries much differently when I'm trying to help somebody out in private than I would if I was posting to a public list. I'm sure other people do the same.

Daniel

On Mar 31, 2005, at 2:20 PM, Dave Thorup wrote:

On Mar 30, 2005, at 7:32 PM, daniel wrote:


Can you break at the call to the SetSize function and see if it looks like the values are being setup correctly the compiler before calling the function? That's what I'd look at. I'm not too familiar with C++ implementation but I assume it probably just translates:

SetSize(nWd, nHt, nExtra);

into

SetSize(nWd, nHt, nExtra, -1, -1, -1);

If you look at the disassembly and it doesn't seem to be what it's doing, then I'd suspect some mismatch somewhere between part of your code thinking it's C++ and part of it thinking it's just C.

If you can't create the problem with a simple test case, perhaps you can pare down your sources to get a smaller test case and then post an example.


Well, here's the appropriate disassembly:

0x001e3f68  <+5396>  lwz    r4,52(r2)
0x001e3f6c  <+5400>  lwz    r5,56(r9)
0x001e3f70  <+5404>  li    r6,20
0x001e3f74  <+5408>  li    r7,0
0x001e3f78  <+5412>  li    r8,0
0x001e3f7c  <+5416>  li    r9,0
0x001e3f80  <+5420>  bl    0x512c58 <Lm2EE7SetSizeEmmssss>

Which corresponds to this:

SetSize( m_nWd, m_nHt, 20 );

So it does look like it's incorrectly setting 0 for each of the nEx2 - 4 parameters. Does anyone have any ideas why it would be doing this? My attempts so far at creating a simple test case have failed. This is very annoying.
_____________________________


Dave Thorup
Software Engineer
email@hidden

http://www.kuwan.net
Defaults Manager - The premier editor for Mac OS X's User Defaults / Preferences database.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Function's default values are corrupted (Nasty bug) (From: Dave Thorup <email@hidden>)
 >Re: Function's default values are corrupted (Nasty bug) (From: Dave Thorup <email@hidden>)

  • Prev by Date: Re: Linking to .so file
  • Next by Date: Link to netinfo
  • Previous by thread: Re: Function's default values are corrupted (Nasty bug)
  • Next by thread: Returned mail: User unknown
  • Index(es):
    • Date
    • Thread