This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: double free when trying to call a C++ function in GDB


On 09/13/2010 08:58 PM, Srinath Avadhanula wrote:
Hi Sami,

provide me with a small reproducer that would be very helpful.

Unfortunately, I am unable to come up with a small reproduction program which fails. Let me try to describe the situation we have:

1. We have a large number of shared libraries which get loaded
2. One of the libraries has an overloaded function with two signatures:
             void printCfgGraph(CG::Cfg* cfg, const char* fname);
             void printCfgGraph(CG::Region* region, const char* fname);
3. CG::Cfg and CG::Region are completely unrelated by inheritance etc.
4. We make a call in GDB to:
             (gdb) call printCfgGraph(mycfg, fname)
      where mycfg is of type CG_Cfg which is a super-class of CG::Cfg.
This crashed GDB


That did it :). I reproduced it using your description exactly. Filed a bug here: http://sourceware.org/bugzilla/show_bug.cgi?id=12028


I should have a fix for ya soon!

Thanks,
  Sami


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]