From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward500p.mail.yandex.net (forward500p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:110]) by sourceware.org (Postfix) with ESMTPS id 2FAEE3858D28 for ; Sun, 5 Dec 2021 16:52:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FAEE3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ya.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ya.ru Received: from iva5-b8875dcd4950.qloud-c.yandex.net (iva5-b8875dcd4950.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:696:0:640:b887:5dcd]) by forward500p.mail.yandex.net (Yandex) with ESMTP id 0293FF010CB; Sun, 5 Dec 2021 19:52:34 +0300 (MSK) Received: from iva1-dcde80888020.qloud-c.yandex.net (iva1-dcde80888020.qloud-c.yandex.net [2a02:6b8:c0c:7695:0:640:dcde:8088]) by iva5-b8875dcd4950.qloud-c.yandex.net (mxback/Yandex) with ESMTP id exTModS3LS-qXa4rX3n; Sun, 05 Dec 2021 19:52:33 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1638723153; bh=qK/JV6vkmvKNGRGzdt2nOBpGjazkh2E0hsOFCCqDDUA=; h=Subject:Cc:From:To:Message-Id:In-Reply-To:References:Date; b=m4WTeLLiJYrxVfHsh6pFc6IE8uLaYSj1e8irA4Q7tv7G8ejGUNkLmv/JXsHEu3wVW m3ayUFSGanH0JC4OmD42CFtdFhnouze6nZkRtA4eLUdGtPSWq1nFTdzfw/TFpL9WJs +lpGAxmraIUr8i5x+M2jGO5OjpVkbvHiwkyjg2kU= Authentication-Results: iva5-b8875dcd4950.qloud-c.yandex.net; dkim=pass header.i=@ya.ru Received: by iva1-dcde80888020.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id SbZNpdvalG-qXQqoHEo; Sun, 05 Dec 2021 19:52:33 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Fwd: 2 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v3] build: allow turning off --no-undefined and -z,defs From: Evgeny Vereshchagin In-Reply-To: Date: Sun, 5 Dec 2021 19:52:32 +0300 Cc: elfutils-devel@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20211203180209.987784-1-evvers@ya.ru> To: Mark Wielaard X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, 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: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2021 16:52:40 -0000 Hi Mark, > But it would help if you replied to the original > reviews and/or mentioned how the different versions of your patch have > changed since the last time. I did but it looks like those emails didn't pass the spam filter. I'll = try to figure out what happened there. Sorry about that! > As far as I can see you only changed the > commit message a little this time. That's correct. I tried to explain in the commit message why = `--disable-undefined` is implemented as a standalone option. > See how I used it to workaround isssues with the > gcc address sanitizer. You can use it likewise to work around issues > with clang. e.g. the configure check should detect the issue with > --no-undefined and could try if adding -lasan to LDFLAGS helps I saw that patch and I think it should make building elfutils with gcc = and running the unit tests under ASan easier. Thanks! But it's based on = the assumption that configure controls ASan flags and can change = CFLAGS/LDFLAGS however it needs. Unfortunately I can't do that on = OSS-Fuzz because all the sanitizer options are passed via CFLAGS there = and I can't interfere with those CFLAGS. FWIW it isn't a theoretical = issue because elfutils was integrated into OSS-Fuzz in = https://github.com/google/oss-fuzz/pull/6944 and has been fuzzed there = since then. And there elfutils is also built with MSan as well (which = has never been implemented in gcc) and I'm not sure how additional = configure options can cover that. I agree that it would be great to make = `--enable-sanitize-{undefined,address}` work with clang as well but I = think it can be done later on top of `--disable-undefined`. > Do you > know why these issues are flagged? Are there any extra ASAN_OPTIONS > set in these cases? No, there aren't. Those issues are flagged because -fsanitize=3Dundefined = in clang by default includes "pointer-overflow" and "vla-bound" (which = as far as I know aren't available in gcc)