From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43704 invoked by alias); 28 Jun 2018 12:31:14 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 43487 invoked by uid 89); 28 Jun 2018 12:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*f:sk:6feeaf0, H*i:sk:6feeaf0, poorly, react X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_PASS autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 3 recipients X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Jun 2018 12:30:58 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79E562BDBF; Thu, 28 Jun 2018 12:30:57 +0000 (UTC) Received: from oldenburg.str.redhat.com (dhcp-192-212.str.redhat.com [10.33.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A47302026D69; Thu, 28 Jun 2018 12:30:56 +0000 (UTC) Subject: Re: Invalid program counters and unwinding To: Jeff Law , GCC , GNU C Library , Binutils , gnu-gabi@sourceware.org References: <6feeaf09-0bc2-238b-42df-2ff915f3581e@redhat.com> From: Florian Weimer Message-ID: <2b47dbd9-f1a2-1bf0-06ca-fca40660fabf@redhat.com> Date: Mon, 01 Jan 2018 00:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <6feeaf09-0bc2-238b-42df-2ff915f3581e@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 28 Jun 2018 12:30:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 28 Jun 2018 12:30:57 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'fweimer@redhat.com' RCPT:'' X-IsSubscribed: yes X-SW-Source: 2018-q2/txt/msg00026.txt.bz2 On 06/28/2018 04:16 AM, Jeff Law wrote: >> Previous discussions: >> >> https://gcc.gnu.org/ml/gcc/2013-05/msg00253.html >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71744 >> https://sourceware.org/ml/libc-alpha/2016-07/msg00613.html >>   (patch with a spread lock, still not async-signal-safe) > You might also want to look at RH BZ 1293594 which I think has pointers > back to an issue from 2008 :( Interesting. That does suspiciously look like a concurrent dlclose. It's just that the crash handler crashes, after the application crash. I think this one is really NOTABUG, both technically and from user impact: we do not cause the crash, we just react poorly to the application triggering undefined behavior. In the bug, you mentioned this code fragment for x86-64: 42 unsigned char *pc = context->ra; 43 struct sigcontext *sc; 44 long new_cfa; 45 46 /* movq __NR_rt_sigreturn, %rax ; syscall */ 47 if (*(unsigned char *)(pc+0) == 0x48 48 && *(unsigned long *)(pc+1) == 0x050f0000000fc0c7) I'm not sure I agree that it is “dumb”, but I think it proves conclusively that you cannot feed random addresses to the unwinder. 8-) Thanks, Florian