From: Mark Geisert <mark@maxrnd.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin debugger crashes every time on following a unique_ptr
Date: Sat, 25 May 2019 21:31:00 -0000 [thread overview]
Message-ID: <4ffe9ce5-8504-f009-2b19-098bdc9b1aef@maxrnd.com> (raw)
In-Reply-To: <CAECqvgfWPBo0VmYk=EG14vQkK-L7f4zGZ==pv-jSMt31vhavZw@mail.gmail.com>
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.
To reproduce with OP's supplied source files in an otherwise clean directory:
g++ -g -o raj *.cpp
gdb raj
[...]
(gdb) b main
(gdb) run
(gdb) n
(gdb) n
At this point you'll be on line 14. Issue the OP's triggering command:
(gdb) p myCar.get()->currentPassengers
Segmentation fault (core dumped)
..mark
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2019-05-25 21:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-25 16:04 Raj Kumar
2019-05-25 21:31 ` Mark Geisert [this message]
2019-05-26 7:52 ` Mark Geisert
2019-05-26 16:05 ` Brian Inglis
2019-05-26 16:40 ` Jon Turney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ffe9ce5-8504-f009-2b19-098bdc9b1aef@maxrnd.com \
--to=mark@maxrnd.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).