From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110302 invoked by alias); 9 Sep 2019 08:57:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 110282 invoked by uid 89); 9 Sep 2019 08:57:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=yourself X-HELO: userp2120.oracle.com Received: from userp2120.oracle.com (HELO userp2120.oracle.com) (156.151.31.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Sep 2019 08:57:52 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x898rfGC020214; Mon, 9 Sep 2019 08:57:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=tCqHv2WGNrfRSivah55d52KKXdFvjaZkHA5NhoIFGVg=; b=QTyYuV6qS1nhmE2sfc34FimhK1hM3BcCrDjPB+MB58UPxDGCeQjMYEMR3tGqEovrmsYX l2XYGsuujgl44vjEfYZYr9itL5Egwe5Vu/R62k36Z4TNY3inB7BiMix3mvi93JL7a4NK AXgSfhLOV5PjD+uolrTY1EU4eqOohl3/rshJoJSlgbCQXuEffQC4/ljc4EL6+jIRcpGs rCEtP8qfCwuWwUqFxqBo+wqtBLxprIh51BhUWtyqQeKVxJZNN6uAVbqAlefHICD0Oa3W Y45kbCIjZHFl/s3gwd9v8P09gNz4dHM+gZsMbsy3An299+PiqTCUdpL5DLYWG/nRs1TG RA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2uw1jk2t1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 09 Sep 2019 08:57:46 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x898sV35071292; Mon, 9 Sep 2019 08:55:45 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2uv3wm8v53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 09 Sep 2019 08:55:45 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x898td8R011409; Mon, 9 Sep 2019 08:55:39 GMT Received: from [10.175.54.141] (/10.175.54.141) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Sep 2019 01:55:39 -0700 Subject: Re: Fix a crash in compile_to_object function To: Rainer Orth Cc: gdb-patches@sourceware.org References: <3ad99625-43ff-a450-6e50-d83242224443@oracle.com> From: libor.bukata@oracle.com Message-ID: <2e87a0b1-c3eb-300f-cdf3-1cf3c2963c2b@oracle.com> Date: Mon, 09 Sep 2019 08:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00129.txt.bz2 Hi Rainer, I noticed it from the testsuite results (crash dump generated) for gdb 8.3. Although it is not implemented for Solaris, it should not crash, which is the reason why I sent a patch that resolves a nullptr dereference. The patched gdb prints an error message (instead of crashing) and the user can continue with debugging. I agree with you that there many more pressing issues that needs to be resolved first. Thanks, Libor On 9/9/19 10:07 AM, Rainer Orth wrote: > Hi Libor, > >> On non-Linux platforms, gdb crashes when compile command is issued >> because of the null pointer in struct osabi_names gdb_osab. The attached >> patch adds a check to avoid this crash and adds osabi name for Solaris. >> However, there is probably more work required to enable compile feature >> on Solaris (e.g., solaris_infcall_munmap) and other platforms. > just out of curiosity: what prompted you to try this? > > I gave it a very quick whirl myself, trying to run the > gdb.compile/compile.exp test on amd64-pc-solaris2.11 with gdb master and > libcc1.so from gcc mainline: all I got was a SIGTRAP from the very first > compile command. > > That said, I'm quite unlikely to work on this any time soon: with > ca. 2500 failures in the gdb testsuite on Solaris and even basic > features unimplented (e.g. I'm currently looking into TLS support), I > believe there are way more pressing issues. However, if you want to > give it a try yourself, I'm more than happy to help get a patch in. > > Rainer >