From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id F089B3858400; Mon, 22 Nov 2021 18:30:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F089B3858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A82761FD39; Mon, 22 Nov 2021 18:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1637605856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FoAUVYcO4d9nVFkChrbpPo/WzenIIgWoD/xtN46HDyc=; b=zZZ/cjwgtecmSbqzI8ja4b3OmrVJlRkYV8vy0yP0+/5s1XB3zk6j/3/v6C2fa3D2nyN1U1 f+m+LcIko988zwb5ZqeM5QosCmzHHKV915o85EfZSQ/aaE7eOAJHK4R9nf/kPHuue95V/M NcYhCTKrbUMMaM85sK4orjnJGdvb+hk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1637605856; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FoAUVYcO4d9nVFkChrbpPo/WzenIIgWoD/xtN46HDyc=; b=XsbglbtnGr8RNQ2W5b+RYMfRq2FhJLAqe4bMd27gIHeQycc07m+ltdanLFG9jnkvb9iJPU OycSoyZLqlin8jCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1058413B0A; Mon, 22 Nov 2021 18:30:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dClKAuDhm2HIZAAAMHmgww (envelope-from ); Mon, 22 Nov 2021 18:30:56 +0000 Message-ID: <1b8fa4e6-7a78-cdbb-c06d-fe7cd58d1e76@suse.cz> Date: Mon, 22 Nov 2021 19:30:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: New ThreadSanitizer runtime (v3) Content-Language: en-US To: Dmitry Vyukov , gcc Cc: ro@gcc.gnu.org, Jakub Jelinek , =?UTF-8?Q?Martin_Li=c5=a1ka?= , Marco Elver , Alexander Potapenko References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2021 18:30:59 -0000 On 11/22/21 16:22, Dmitry Vyukov wrote: > Hi gcc developers, Hello. > > I wanted to give heads up regarding a significant re-design of the Thanks for it. > ThreadSanitizer runtime: > https://reviews.llvm.org/D112603 > Currently it's submitted: > https://github.com/llvm/llvm-project/commit/1784fe0532a69ead17793bced060a9bf9d232027 > but can well be rolled back if too many buildbots fail, but should be > submitted again soon anyway. > > It was extensively tested and lots of bugs were fixed, but it's still > possible it will cause some issues just because of the size of the > change and OS/arch sensitivity. > > For a wide range of real programs it provides 20%-4x speedup on x86_64 > and 20-40% memory consumption reduction. That are all good news! > > One issue that will come up with gcc is the use of the new > disable_sanitizer_instrumentation attribute in tests: > https://clang.llvm.org/docs/AttributeReference.html#disable-sanitizer-instrumentation > e.g.: > https://github.com/llvm/llvm-project/blob/1784fe0532a69ead17793bced060a9bf9d232027/compiler-rt/test/tsan/java_symbolization.cpp#L5 Well, apparently the tsan tests (similarly to other Sanitizer) are not synchronized and we only have a small subset of test. Right now I'm working on the libsanitizer's merge from master and tsan.exp tests work fine. > ThreadSanitizer is now more picky about recursing from runtime > callbacks back into runtime. > You may either disable these tests, or move callbacks into > non-instrumented files (though, will require forking tests), or > implement the attribute. > Some uses of the disable_sanitizer_instrumentation attribute were also > discussed in the Linux kernel context. KMSAN will use it and kernel > noinstr functions could use it, though currently noinstr functions are > post-processed with kernel's objtool, which nops any sanitizer > callbacks. The objtool approach will continue to work, so it's not > that the attribute is mandated. > Right now, we as GCC have no_sanitize ("sanitize_option") that can be used (or no_sanitize_* attributes). Can you please explain why did you invent the new flag? Cheers, Martin