From owner-freebsd-current@freebsd.org Mon Oct 30 14:32:11 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8046EE5E7F1 for ; Mon, 30 Oct 2017 14:32:11 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay119.isp.belgacom.be (mailrelay119.isp.belgacom.be [195.238.20.146]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D53B6649A0; Mon, 30 Oct 2017 14:32:10 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AGGZ9+BzPSZ+D+nDXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?1OwUIJqq85mqBkHD//Il1AaPBtSLraocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze6/9pnQbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeu?= =?us-ascii?q?BWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbO?= =?us-ascii?q?SxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHmiC?= =?us-ascii?q?kJKSM3/mLVhcx+g61UvB2vqgdjw4PWfI2ZKOZycr/Dcd4cWGFPXtxRVytEAo6k?= =?us-ascii?q?cYUPDugBPeJFpITjoFsOqgC+ChepBOz1zD9InWL90Kom0+QgEwHG2BctEdIUsH?= =?us-ascii?q?vKstr4KbocX+6vwKnP1zXDYOpb1DHg44bGdRAhpOuDXbN2ccfJxkkvER7Fgk+X?= =?us-ascii?q?qYz/MDOY0PkGvWuD7+d4Vu+jl3Qrpx9trjSz3Mshi43EipgIxlza+yh0xps+K8?= =?us-ascii?q?eiR05he9GkFYNdtySdN4RrXMwvW3pouCMmyr0evp67YTQKxIwnxxHBb/yHdJCF?= =?us-ascii?q?4hH5W+aVIDd4gWxqeKi4hxqo7Uigy+/8Vs2u3FlWqSpFlcLMuW4I1xPJ7MiHUe?= =?us-ascii?q?Fx/kC72TaAzwzT6+dELl4olafDKJMt3qQ8moQPvUjfBCP7mUH7gLWLekk69OWk?= =?us-ascii?q?8+Hnba/npp+YOY90kAb+MqE2l8yjAOQ4MAwOUnOV+eSmyrLs41b2QK5XgfEsla?= =?us-ascii?q?nZqp/aKdwBpqGlGw9Vzpoj6xGnAjel19QYhmUHLFNGeB2ckYfpP0rDIP/9Dfil?= =?us-ascii?q?glSslC1nyOzBPr3kUd3xKS3qlrv7cL9mo3Jbwg4+15gL7pRYELwIO+62Xk7qqP?= =?us-ascii?q?TWAQ0/PhDyyOaxW/tn0YZLZWONBueyN6TJvFqB4Plnd/WNZos9lizwJtIey7jp?= =?us-ascii?q?l3BvygxVRrWgwZZCMCPwJf9hOUjMOXc=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BuGACnNvdZ/3tFyFBcGwEBAQMBAQEJA?= =?us-ascii?q?QEBFgEBAQMBAQEJAQEBgzRUEG4njw+OHAEBgXsyAZggLYUOBAQCAoReRRMBAQE?= =?us-ascii?q?BAQEBAQEBAWoogjgigkQBBTocIxALGAklDyoeBhOKJwyqaIp9AQEBAQEBAQECA?= =?us-ascii?q?QEBAQEBHQWDLohtgz6HSQWiA4dmjQmBAIEJkTFIjBeKajcggWhVMghJgmSCXBy?= =?us-ascii?q?BaEA2AY0gAQEB?= X-IPAS-Result: =?us-ascii?q?A2BuGACnNvdZ/3tFyFBcGwEBAQMBAQEJAQEBFgEBAQMBAQE?= =?us-ascii?q?JAQEBgzRUEG4njw+OHAEBgXsyAZggLYUOBAQCAoReRRMBAQEBAQEBAQEBAWoog?= =?us-ascii?q?jgigkQBBTocIxALGAklDyoeBhOKJwyqaIp9AQEBAQEBAQECAQEBAQEBHQWDLoh?= =?us-ascii?q?tgz6HSQWiA4dmjQmBAIEJkTFIjBeKajcggWhVMghJgmSCXByBaEA2AY0gAQEB?= Received: from 123.69-200-80.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([80.200.69.123]) by relay.skynet.be with ESMTP; 30 Oct 2017 15:32:08 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id v9UEW7oN013844; Mon, 30 Oct 2017 15:32:07 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Mon, 30 Oct 2017 15:32:07 +0100 From: Tijl Coosemans To: Andreas Tobler Cc: Konstantin Belousov , freebsd-current@FreeBSD.org, gerald@FreeBSD.org Subject: Re: Segfault in _Unwind_* code called from pthread_exit Message-ID: <20171030153207.15a42a1e@kalimero.tijl.coosemans.org> In-Reply-To: <9a724da4-70f1-4330-9a77-619739008a14@fgznet.ch> References: <20170823163707.096f93ab@kalimero.tijl.coosemans.org> <20170824154235.GD1700@kib.kiev.ua> <20170824180830.199885b0@kalimero.tijl.coosemans.org> <20170825173851.09116ddc@kalimero.tijl.coosemans.org> <20170825234442.GO1700@kib.kiev.ua> <20170826202813.1240a1ef@kalimero.tijl.coosemans.org> <20170826184034.GR1700@kib.kiev.ua> <20171029182351.502f53cf@kalimero.tijl.coosemans.org> <20171029191358.GU2566@kib.kiev.ua> <9a724da4-70f1-4330-9a77-619739008a14@fgznet.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 14:32:11 -0000 On Sun, 29 Oct 2017 20:40:46 +0100 Andreas Tobler wrote: > Attached what I have for libgcc. It can be applied to gcc5-8, should > give no issues. The mentioned tc from this thread and mine, > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82635 do pass. > > What do you think? Like I said before the return address can be anything. It could for instance point to some instruction in a random function and then the stack unwinder will think thread_start was called from that function. There's no check you can add to libgcc to distinguish that from a normal valid return address.