From patchwork Thu Sep 27 19:20:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 187452 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BAA152C00B6 for ; Fri, 28 Sep 2012 05:21:11 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1349378473; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=P3A26ipV+tMihW5hkr7YhUJHXq8=; b=hz5aNRJyXmePA7W gjNgB5jHmwcHNADRihrrT3Kg066XvezQVMux8nbnnH8ClTDicSbhmbqApsMDi4FR 71vjGAgrQrtVEOSfjF2Ji04jhOFKbuKIU+K6TRPLcLIVf7JNJK2XC5xy5x/bHqQs SO1bMG92NBWdmGBlElRmhS3Xvvf0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=t1Ydevf32SgZ64B9AYbyYx3B02FO8bOdVX5LjFvW3su9sqWvmJDQakPEevNXlh qEOrI43b6RQcatKPfsVMDQEdEqneMPSkJsl/UIAIoikUcqgZhcbSPcjwoiwwIZsd /9aQrBVrdIu8IWvC85UONYUAo5pSPqy3h+XIHezqdur9A=; Received: (qmail 18078 invoked by alias); 27 Sep 2012 19:21:01 -0000 Received: (qmail 18058 invoked by uid 22791); 27 Sep 2012 19:20:59 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Sep 2012 19:20:55 +0000 Received: by pbbro12 with SMTP id ro12so4247483pbb.20 for ; Thu, 27 Sep 2012 12:20:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=jGLNFsg/Icz7NnxpIQdsdzUZgyareQbV4oJxiXNNDJY=; b=F+uuiY1Y1BT44CKejKpC8k3UlcVQk54ZgPx7aOD9uSiJLPvGfWrJ60Fo+gv9FhoJjb L4S7id2v3/jhEVAiPJe9KIvJBXFBpRd6EBTc8kFrcXRIvX/JfpOIckNcypojiQSa7PU2 g7nGUxK93hx4JRV+eCImNRcGSuoFTinp4/J/guwnXV/uFJAAzPWGHs9vGbO+7r5Zd5IA 3E2c587ieevNIuza2P0s9AHIPy00KF0uCNXUNP0qeXC+ntCogEEjLh2ekhUd2cTXVjfY OTG3OsULE1VqZG+JJ7D8cGR20sXWf3wdeaW6HGF4cuiA0xxjPe4v+4Fq4WZ5QNQSwaXc w2ZQ== Received: by 10.68.129.72 with SMTP id nu8mr14217164pbb.29.1348773654708; Thu, 27 Sep 2012 12:20:54 -0700 (PDT) Received: by 10.68.129.72 with SMTP id nu8mr14217130pbb.29.1348773654454; Thu, 27 Sep 2012 12:20:54 -0700 (PDT) Received: from coign.google.com ([172.17.33.142]) by mx.google.com with ESMTPS id ty1sm4246753pbc.76.2012.09.27.12.20.53 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 12:20:53 -0700 (PDT) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org Subject: Patch committed: Fix crash in libbacktrace if no debug info Date: Thu, 27 Sep 2012 12:20:51 -0700 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlw+Q4EFsVtv26vNvJyz9Ydwq62PWaEF4QjKjPpC6Y4FLTbSgb53qyknKcbidNtz4AYSdq2r6EkOkf39BvB71VX8ipp4LfAeve7G/9kleAgCKPr5DNAxFI5G1Y2WTbjDgnhHOLdRN+tk04a7b27Vd93XVVBPjXvoBHdt6298GCVohVJrKoCqfSv738tiku2eqpol33aaobNsmJ1xEn8bsu2LhwtBw== X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org When changing the libbacktrace interface to avoid using mutexes, I missed a spot. This caused libbacktrace to crash on a binary with no debug info. This patch fixes the problem. Bootstrapped and ran libbacktrace tests. Committed to mainline. Ian 2012-09-27 Ian Lance Taylor PR other/54726 * elf.c (backtrace_initialize): Set *fileln_fn, not state->fileln_fn. Index: elf.c =================================================================== --- elf.c (revision 191810) +++ elf.c (working copy) @@ -634,7 +634,7 @@ backtrace_initialize (struct backtrace_s { if (!backtrace_close (descriptor, error_callback, data)) goto fail; - state->fileline_fn = elf_nodebug; + *fileline_fn = elf_nodebug; state->fileline_data = NULL; return 1; }