From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 4279038C5E3A for ; Sat, 11 Jun 2022 12:03:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4279038C5E3A Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id A1E31667BC; Sat, 11 Jun 2022 08:03:31 -0400 (EDT) Message-ID: Subject: Re: [PATCH] Mips: Enable asynchronous unwind tables with both ASAN and TSAN From: Xi Ruoyao To: Dimitrije Milosevic , "gcc-patches@gcc.gnu.org" Cc: Djordje Todorovic Date: Sat, 11 Jun 2022 20:03:29 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2022 12:03:35 -0000 > Well, so should we add TSAN_SUPPORTED=3Dyes for MIPS64 in > libsanitizer/configure.tgt first?=C2=A0 I'll try this on my MIPS64 in a f= ew > days. Just tried TSAN_SUPPORTED=3Dyes with asynchronous unwind tables enabled, but I got some strange test failures for tls_race.c: FAIL: c-c++-common/tsan/tls_race.c -O0 output pattern test Output was: ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:452 "((thr_end)) <= =3D ((tls_addr + tls_size))" (0xffec35f8c0, 0xffec35f784) (tid=3D748216) #0 __tsan::CheckUnwind() ../../../../gcc/libsanitizer/tsan/tsan_rtl.cpp= :627 (libtsan.so.2+0xa30ec) #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned lon= g long, unsigned long long) ../../../../gcc/libsanitizer/sanitizer_common/s= anitizer_termination.cpp:86 (libtsan.so.2+0xeb8cc) #2 __tsan::ImitateTlsWrite(__tsan::ThreadState*, unsigned long, unsigne= d long) ../../../../gcc/libsanitizer/tsan/tsan_platform_linux.cpp:452 (libt= san.so.2+0xa0cac) #3 __tsan::ThreadStart(__tsan::ThreadState*, unsigned int, unsigned lon= g long, __sanitizer::ThreadType) ../../../../gcc/libsanitizer/tsan/tsan_rtl= _thread.cpp:197 (libtsan.so.2+0xc0e88) #4 __tsan_thread_start_func ../../../../gcc/libsanitizer/tsan/tsan_inte= rceptors_posix.cpp:1009 (libtsan.so.2+0x3e5dc) #5 start_thread /sources/glibc-2.35/nptl/pthread_create.c:442 (libc.so.= 6+0xc75f4) I've tried to diagnose the root cause but failed. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University