From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nx202.node02.secure-mailgate.com (nx202.node02.secure-mailgate.com [192.162.87.202]) by sourceware.org (Postfix) with ESMTPS id 862333858D20 for ; Fri, 10 May 2024 05:57:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 862333858D20 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=hotmail.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 862333858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.162.87.202 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715320677; cv=none; b=f6wePaWPyLpCQ3zlcgkvq45rdHgwP3+u6SpSyblQUxDug7bPYtnUUws/YV4gpmOm9yHDVVt09tKK7jX/AGmbBxwbuT3NdFHpc/klPKDx+43/jrUxUfOnBDl2XAaw7S+pKIJxP1kJAKk48qkQM5MM0VyO5lqizbznsUD/HVfCqfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715320677; c=relaxed/simple; bh=6JAB8Y2KAyVfzrYCI6R4yCrzBX4OuVjPlhrrGTk9YeU=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=q80teg7UTbGeGAXOlxTDwlw6ms4MTRRtBDNVEoVyykU5UPcyMccDuMYq0mfQIsmNFAgPzgMtjzCwiqjst8nc+58BQ3DdN9/V45N59vuhIHDbCNk3kdi05YXaH0GDnODvDIsn2R8EYI80l1pxUtSS8AQZIkQGBVX0DPEDRrFTPfY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from web73.alfahosting-server.de ([5.44.111.53]) by node02.secure-mailgate.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1s5JGP-002dJq-GP; Fri, 10 May 2024 07:57:53 +0200 X-SecureMailgate-Identity: web24339892p2;web73.alfahosting-server.de Received: from proxy01.mail.wum.dogado.net (proxy01.mail.wum.dogado.net [5.44.111.201]) (Authenticated sender: web24339892p2) by web73.alfahosting-server.de (Postfix) with ESMTPSA id 121B7282033; Fri, 10 May 2024 07:57:48 +0200 (CEST) X-SecureMailgate-Identity: web24339892p2;web73.alfahosting-server.de Message-ID: <7fe48268-18d8-4c0f-8d2c-b763d82cf8db@hotmail.de> Date: Fri, 10 May 2024 07:59:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix heap-use-after-free in index-cached with --disable-threading To: Hannes Domani , Tom Tromey Cc: "gdb-patches@sourceware.org" References: <20240504110942.922-1-ssbssa.ref@yahoo.de> <20240504110942.922-1-ssbssa@yahoo.de> <878r0p1szk.fsf@tromey.com> <1287184562.10844646.1714841805671@mail.yahoo.com> Content-Language: en-US From: Bernd Edlinger In-Reply-To: <1287184562.10844646.1714841805671@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <171532066876.3825361.17822460407685798937@web73.alfahosting-server.de> X-PPP-Vhost: edlinger-online.de X-Originating-IP: 5.44.111.53 X-SecureMailgate-Domain: web73.alfahosting-server.de X-SecureMailgate-Username: 5.44.111.53 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=5.44.111.53@web73.alfahosting-server.de X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT//6v5DYNDjv60IQUYJ0YRvPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wEJeywUlV7NIpid7rxl4SYciYvU0PcIHnr34KK4GXrC5LA zcIpOBSZ0XLMDModnPnPz7oljCCN3Ql4VKRL0KPL4BOspqph5rHDu4vvCXpbXsmoQBsXQenjhC1y 916QBxQk4Ndu06h2Q8QP5GQeNUYft0B0upRetlwg9oXpGBNppDC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ROM,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/4/24 18:56, Hannes Domani wrote: > Am Samstag, 4. Mai 2024 um 17:45:06 MESZ hat Tom Tromey Folgendes geschrieben: > >>>>>>> "Hannes" == Hannes Domani writes: >> >> Hannes> Fixed by making cooked_index_worker::wait only return true if desired_state >> Hannes> is CACHE_DONE, same as if threading was enabled, so m_state will not be >> Hannes> prematurely deleted. >> >> Hannes> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31694 >> >> Thank you.  This is ok. >> Approved-By: Tom Tromey > > Pushed, thanks. > > > Hannes > Hi, due to this incident you fixed here, I did some testing with tsan, and found a couple issues that I think are important, but I have no good idea how to solve them. https://sourceware.org/bugzilla/show_bug.cgi?id=31713 https://sourceware.org/bugzilla/show_bug.cgi?id=31715 https://sourceware.org/bugzilla/show_bug.cgi?id=31716 I have found an issue (bug#31715) with the function cooked_index_worker::wait that was changed here. In one of the tsan reports I see something interesting here: https://sourceware.org/bugzilla/attachment.cgi?id=15506 The cooked_index_worker::wait apparently proceeds and reads the "canonical" using cooked_index_entry::full_name without lock, and later a worker thread changes this value also without lock. Do you have any idea what is going on here? Thanks Bernd.