• 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
std::string generating Duplicate free warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

std::string generating Duplicate free warnings


  • Subject: std::string generating Duplicate free warnings
  • From: Mark Alldritt <email@hidden>
  • Date: Fri, 26 May 2006 08:10:04 -0700
  • Thread-topic: std::string generating Duplicate free warnings

Hi Folks,

My application contains pure C++, Objective-C++ and Objective-C code.  I
have a shared library (framework) that uses std::string.  I also have code
in my main application that uses std::string.  I'm seeing lots of duplicate
free warnings appearing on the console that are originating from
std::string:

Script Debugger 4(8809,0xa000cf60) malloc: ***  Deallocation of a pointer
not malloced: 0xa0b03ab4; This could be a double free(), or free() called
with the middle of an allocated block; Try setting environment variable
MallocHelp to see tools to help debug

The address is always the same, and when I set a breakpoint on
malloc_printf, its always happening when std::string is freeing its initial
empty string.  Here are the two stack traces I see:

#0    0x9010c187 in malloc_printf
#1    0x90005b40 in free
#2    0x06990a47 in std::string::_M_mutate
#3    0x06990f11 in std::string::assign

#0    0x9010c187 in malloc_printf
#1    0x90005b40 in free
#2    0x90b23110 in std::string::_Rep::_M_destroy

What should I do to get Xcode stop doing this?

Cheers
-Mark

------------------------------------------------------------------------
Mark Alldritt                      Late Night Software Ltd.
Phone: 250-380-1725                Script Debugger 4.0 - AppleScript IDE
WEB:  http://www.latenightsw.com/  FaceSpan 4.3 - AppleScript RAD
                                   Affrus 1.0 - Perl Debugging


 _______________________________________________
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

  • Prev by Date: Re: Try-catch broken in gcc4.0?
  • Next by Date: Re: DWARF problems?
  • Previous by thread: Re: DWARF problems?
  • Next by thread: mpi programme broken with new gcc 4.0.1?
  • Index(es):
    • Date
    • Thread