X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=eKWzIznSqOArARtQ ATYoQ+llxDMMQdKV/pIP8nVxZ/FnJZJIZ1nfZ5SnYakXLBO25QUaQdtQ7Mec3jVH JufrlrQgtb+kvvmiz8p6zBP5WNwMOfbwi3fTuLFQp4NOQuECPOdTv/jlgmwG9S9G VLN37Neo8lpZCqBxQBmYV+cmUDk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=wUIyIsh8BRTHobPO6w1z0G nH36U=; b=cfn1K2Ch3f5NfWAod+d9p1vpCd6CFnc6CR5XAjudGf8XdRO9J3zH2/ yzkjRiCrhCqsCRJMB0dBLBLmv7cn3mQKZLQcOuDL1i9TdYUbur/C/BQDiKzdT3KD RqzraQ5I7Euc3XuAKvLY+JhgTBF6VLavklim1X964nLRM+w2Id1tY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: Cygwin debugger crashes every time on following a unique_ptr To: cygwin AT cygwin DOT com References: From: Mark Geisert Message-ID: <4ffe9ce5-8504-f009-2b19-098bdc9b1aef@maxrnd.com> Date: Sat, 25 May 2019 14:31:45 -0700 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 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