Re: Cygwin debugger crashes every time on following a unique_ptr
- Date: Sun, 26 May 2019 17:40:10 +0100
- From: Jon Turney <jon.turney@xxxxxxxxxxxxxxxx>
- Subject: Re: Cygwin debugger crashes every time on following a unique_ptr
On 25/05/2019 22:31, Mark Geisert wrote:
Raj Kumar wrote:
Adding a watch is equivalent to when in the gdb window I try and do
this: myCar.get()->currentPassengers. This crashes the GDB every time.
So the issue occurs when I try to follow the object pointed to by a
unique_ptr and try to get its attributes/variables.
I can confirm this issue. The fault is reported by Cygwin's memcpy().
I'm having a heck of a time trying to get a gdb backtrace to show what
in gdb itself is likely calling memcpy() with a bad arg.
When debugging gdb with itself here, you'll need to use 'set
cygwin-exceptions on' to allow it to stop on exceptions inside the
(This would be a lot more usable if gdb ignored exceptions inside the
specific functions where it makes sense to do that (e.g.
verifyable_object_isvalid, etc.), rather than anywhere in the cygwin
DLL, if someone wants to fix that...)
To reproduce with OP's supplied source files in an otherwise clean
g++ -g -o raj *.cpp
(gdb) b main
At this point you'll be on line 14. Issue the OP's triggering command:
(gdb) p myCar.get()->currentPassengers
Segmentation fault (core dumped)
Thanks for the reproduction instructions.
This seems to be the issue discussed in , fixed by .
This fix is contained in the 8.2.1-1 Cygwin test release of gdb.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple