Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

malloc - double free problem on Leopard



Hi,

 

When running my application on Mac OS 10.5, I get the following message:

 

TestApp(501,0x98b400) malloc: *** error for object 0x1c7d20: double free

*** set a breakpoint in malloc_error_break to debug

 

The top of the stack stack looks something like this:

 

#0  0x93b36014 in malloc_printf ()

#1  0x93b30904 in szone_error ()

#2  0x93a25fe8 in localeconv_l ()

#3  0x93a76ec4 in __strtodg ()

#4  0x93a76b44 in strtof_l ()

#5  0x32092b40 in std::__convert_to_v<float> ()

#6  0x3206f290 in std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::do_get ()

#7  0x32063394 in std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::get ()

#8  0x3205f5a8 in std::istream::operator>> ()

 

Looks like the problematic code is caused by my operator>>, trying to read a float from istrstream.

However, this code is very simple and standard, it works fine on 10.4 and it works for most of the time on 10.5 as well.

I tried to link statically with STL, but the problem persists.

Is it possible there's a problem with runtime library?

 

Any help is much appreciated!

 

Leon

 

 

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

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.