From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107670 invoked by alias); 26 Aug 2019 13:37:14 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 107657 invoked by uid 89); 26 Aug 2019 13:37:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=hunting, H*c:alternative X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx0b-0010f301.pphosted.com Received: from mx0b-0010f301.pphosted.com (HELO mx0b-0010f301.pphosted.com) (148.163.153.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Aug 2019 13:37:12 +0000 Received: from pps.filterd (m0102858.ppops.net [127.0.0.1]) by mx0b-0010f301.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7QDawd5016822; Mon, 26 Aug 2019 08:37:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rice.edu; h=date : from : subject : to : cc : message-id : in-reply-to : references : mime-version : content-type; s=ricemail; bh=pnXcPTcSE/QI2a2roIMeUwI+LkoHJOQIuNoWmAEUV+o=; b=DerVuFLrN5JPo+b1Al9w2pEVbOvxoVfeN3vDu4oANvbcQ5736l/R39huqB02A3xV6GVo bdjosMam4OjMBNYGjBlNW3reImFUk0hqrHo1ex8mQgR5AScGs5xQaJP4K2jvVWBNrWb1 q5wExzwxM8v0ko83uM/v3Lr5/JP1LtEGefVU/JEOCIPi9QPpRkDM0gNp+1PHIfoclwLz naoFfwzkSeAk9rz37aX0sh+8YC4FG63djDjWXuwGMzggT+XZwucb7QwXPklRCYbNwirC EvKijjkoTwAiYtJdKmtZ7X1C0wuy/1dRPQJQHW0kOVb/kKt5Tf7n1/VSEM7g/Yo9hnhj jA== Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by mx0b-0010f301.pphosted.com with ESMTP id 2ujyxqhs0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 08:37:08 -0500 Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id 035C25002C6; Mon, 26 Aug 2019 08:37:08 -0500 (CDT) Received-X: from mh2.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh2.mail.rice.edu (Postfix) with ESMTP id 02106500213; Mon, 26 Aug 2019 08:37:08 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel Received-X: from mh2.mail.rice.edu ([127.0.0.1]) by mh2.mail.rice.edu (mh2.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id eAje3s1rWby1; Mon, 26 Aug 2019 08:37:07 -0500 (CDT) Received: from deepthought (unknown [73.255.32.32]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jma14) by mh2.mail.rice.edu (Postfix) with ESMTPSA id A86C2500191; Mon, 26 Aug 2019 08:37:07 -0500 (CDT) Date: Mon, 26 Aug 2019 13:37:00 -0000 From: Jonathon Anderson Subject: Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev() To: Mark Wielaard Cc: elfutils-devel@sourceware.org, Srdan Milakovic Message-Id: <1566826627.5246.0@smtp.mail.rice.edu> In-Reply-To: References: <1565983469.1826.0@smtp.mail.rice.edu> <20190824232438.GA2622@wildebeest.org> <1566695452.979.1@smtp.mail.rice.edu> <5ba06557703ee363e19488c994cbddd92ade25be.camel@klomp.org> <1566782688.5803.0@smtp.mail.rice.edu> X-Mailer: geary/0.12.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-26_07:2019-08-26,2019-08-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 spamscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=832 clxscore=1015 suspectscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1906280000 definitions=main-1908260148 Content-Type: text/plain; charset=us-ascii; format=flowed X-SW-Source: 2019-q3/txt/msg00137.txt.bz2 Looks correct to me (assuming it applies). I think there's another latent bug in there somewhere (tests that use libdwfl used to leak mem_tails, but now that dwarf_begin_elf doesn't do an initial malloc it doesn't trigger), I'll try hunting it down when I have the time. Glad I could be of help testing the mailinglist :) -Jonathon On Mon, Aug 26, 2019 at 8:18 AM, Mark Wielaard wrote: > Hi Jonathon, > > Thanks for checking our new mailinglist settings :) > You message was accepted now and the HTML attachment stripped. > > On Sun, 2019-08-25 at 20:24 -0500, Jonathon Anderson wrote: >> The one extra line in dwarf_getcfi.c >> is to account for a failure in the test suite when Valgrind is >> enabled (didn't catch it the first time around). > > That is an interesting catch. And obviously a latent bug. It works if > things are in the first memblock (as part of the larger Dwarf struct), > since that is allocated with calloc, and so zeroed out. But if the cfi > would get into a later memblock it would get a random value, since > those are malloced. In your patch the memblocks are always malloced, > and so the bug shows up immediately. > > Lets just cherry-pick this fixup since it is a good fixup to have. > > Does the attached look correct? > > Thanks, > > Mark