From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21882 invoked by alias); 22 Jul 2009 08:55:43 -0000 Received: (qmail 21853 invoked by uid 22791); 22 Jul 2009 08:55:42 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jul 2009 08:55:34 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6M8tUbY005667; Wed, 22 Jul 2009 04:55:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6M8tSEe030833; Wed, 22 Jul 2009 04:55:29 -0400 Received: from hase.home (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6M8tR4J015472; Wed, 22 Jul 2009 04:55:28 -0400 From: Andreas Schwab To: ppluzhnikov@google.com (Paul Pluzhnikov) Cc: gdb-patches@sourceware.org Subject: Re: [RFC][patch] Work around for gold/10400 bug. References: <20090722001233.C049876BC0@localhost> X-Yow: I Know A Joke Date: Wed, 22 Jul 2009 10:46:00 -0000 In-Reply-To: <20090722001233.C049876BC0@localhost> (Paul Pluzhnikov's message of "Tue, 21 Jul 2009 17:12:33 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 X-SW-Source: 2009-07/txt/msg00534.txt.bz2 ppluzhnikov@google.com (Paul Pluzhnikov) writes: > + if (aa->address_range != bb->address_range > + && aa->eh_frame_p == 0 && bb->eh_frame_p == 0) > + /* Linker bug, e.g. gold/10400. > + Work around it by keeping stable sort order. */ > + return (char *) a - (char *) b; This can overflow. Andreas. -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."