From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69208 invoked by alias); 25 May 2019 21:31:58 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69195 invoked by uid 89); 25 May 2019 21:31:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=H*c:ISO-8859-1, H*Ad:U*mark, kumar, Kumar X-HELO: m0.truegem.net Received: from m0.truegem.net (HELO m0.truegem.net) (69.55.228.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 25 May 2019 21:31:55 +0000 Received: (from daemon@localhost) by m0.truegem.net (8.12.11/8.12.11) id x4PLVrIS078010 for ; Sat, 25 May 2019 14:31:53 -0700 (PDT) (envelope-from mark@maxrnd.com) Received: from 162-235-43-67.lightspeed.irvnca.sbcglobal.net(162.235.43.67), claiming to be "[192.168.1.100]" via SMTP by m0.truegem.net, id smtpdaVzpb0; Sat May 25 14:31:46 2019 Subject: Re: Cygwin debugger crashes every time on following a unique_ptr To: cygwin@cygwin.com References: From: Mark Geisert Message-ID: <4ffe9ce5-8504-f009-2b19-098bdc9b1aef@maxrnd.com> Date: Sat, 25 May 2019 21:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2019-05/txt/msg00222.txt.bz2 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