From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 378A51F44D for ; Tue, 2 Apr 2024 14:35:47 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=BI7gopSB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=BPPsdo4g; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4D77683BF7; Tue, 2 Apr 2024 14:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1712068537; bh=neN2nM4AZeVzHsGRr/TWZCmlYmeu8W2pi+iTFTjnRgU=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=BI7gopSBWNXhODLxYHylj7XMzmNuViNoUGj1/IwuPm70hxFuoNWnyAd1HldNOGsaB LD0EMW9uhk149kGf+fYdVO3PgKlaVPCBOcsNrCFb4dDpRHfO8V+rixfy7AmSEjXEIP rp5YNy/szsvZiS8ACq4vgUzTRYPl4Ld/+l0ZSXKE= Received: from s.wfbtzhsw.outbound-mail.sendgrid.net (s.wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 79B2D83BC2 for ; Tue, 2 Apr 2024 14:35:34 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=BPPsdo4g; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=/Er8wol2OqzAp71ep8qAX9/wbx30pCruR0DcKeg9ApU=; b=BPPsdo4giKoghdzLjgftInflOmDBQYRvINqy4USEMHRnItZ1Tb2ciaDZVBRREM6i6Dro Ns+i6g04lJCiNPqlSvBkUabPUxHa5ln1baHn98sb3Q3bqPlNc4DDpR4IbsaOWe70g63dk3 UXw2T+IIZWUNEOy/gIZeCR0HB/MGO6+VCDgH6TjwiLyK7Q15M8PhwhVyBSLnEjCXDaMRIO NV8vb/leR/4Dc2NuAUmZ9O5MQKZ1SrD6SK9WsVjxupG18ZjaNpZqP3y/Q4HvHfM5T84ezp VIgJvhocDS16sRkTACALmBz6y9PMNWIkYsSqJ6HKP74wXQA1Ux4aEfCr9g1wxJew== Received: by filterdrecv-87f449884-vx9bc with SMTP id filterdrecv-87f449884-vx9bc-1-660C17B5-19 2024-04-02 14:35:33.624003995 +0000 UTC m=+1274988.120210688 Received: from herokuapp.com (unknown) by geopod-ismtpd-14 (SG) with ESMTP id dy9zCbPHThCzcGL6-IARew for ; Tue, 02 Apr 2024 14:35:33.573 +0000 (UTC) Date: Tue, 02 Apr 2024 14:35:33 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Misc X-Redmine-Issue-Id: 20387 X-Redmine-Issue-Author: kjtsanaktsidis X-Redmine-Issue-Assignee: kjtsanaktsidis X-Redmine-Issue-Priority: Normal X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 94002 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax3JiCRSSD6nzL4z=2FxE4FEoMISHLGlc?= =?us-ascii?Q?joLdQgHQPcX=2Fcw6XmwMCZxZgom53qBBFiVAy56E?= =?us-ascii?Q?mWOzIDWATNcscaO8z9kLRkSQXw6SB0zr=2FbGg2N6?= =?us-ascii?Q?DWz+EwAiZfGwdNtEh5T7d6ACdZObMc437=2F3OizY?= =?us-ascii?Q?PjePUdFjQc7C6b+SXyKSv01biw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: QZZ2UT77NV7RCNUWNXP7BTDQJRFEJNYS X-Message-ID-Hash: QZZ2UT77NV7RCNUWNXP7BTDQJRFEJNYS X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117407] [Ruby master Misc#20387] Meta-ticket for ASAN support List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "Eregon (Benoit Daloze) via ruby-core" Cc: "Eregon (Benoit Daloze)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20387 has been updated by Eregon (Benoit Daloze). kjtsanaktsidis (KJ Tsanaktsidis) wrote in #note-13: > That's not a bad idea (avoid adding yet more combinations!) but do you know how widely these builds are currently used and what for? ASAN will make them a heck of a lot slower so that might be undesirable for some uses. They are builds using `-DRUBY_DEBUG=1` and `optflags=-O3 -fno-inline"` so I would think already quite a bit slower, so it sounds OK to me. These ruby-debug builds are currently meant to help CRuby development, i.e., using them on your gem helps finds bugs in CRuby. I don't think there are used very often. I think the use-case here is close enough and I am not so keen on adding a 3rd kind of CRuby dev build. ---------------------------------------- Misc #20387: Meta-ticket for ASAN support https://bugs.ruby-lang.org/issues/20387#change-107580 * Author: kjtsanaktsidis (KJ Tsanaktsidis) * Status: Open * Assignee: kjtsanaktsidis (KJ Tsanaktsidis) ---------------------------------------- I was asked to provide a bit of information about the current status of ASAN in CRuby, so I thought I'd open this meta-ticket to track all of the work I've been performing on fixing up address sanitizer support. So far, I have fixed the following issues related to ASAN support: * https://bugs.ruby-lang.org/issues/20001 + https://github.com/ruby/ruby/pull/9505, which dealt with two main themes: - Pushing the logic for capturing the start of the machine stack much closer to the top of the call stack, so that VALUEs stored close to the top of the machine stack get marked properly - Marking VALUEs stored on ASAN fake stacks during machine stack marking * https://bugs.ruby-lang.org/issues/20220 + https://github.com/ruby/ruby/pull/9734, which made M:N threading notify ASAN about stack switches in the same way that fibers do - Note: ASAN still doesn't work with M:N threading, but that actually has nothing to do with ASAN; it's because the most recent versions of Clang which are needed for ASAN just don't work with M:N threading either. See https://bugs.ruby-lang.org/issues/20243 for more info about that. * https://bugs.ruby-lang.org/issues/20273 + https://github.com/ruby/ruby/pull/10012, which disables `callcc` (and the associated tests) when ASAN is enabled - callcc is very rarely used in real code and the way it works is just fundamentally incompatible with ASAN (it performs longjmp's which I think are technically undefined behaviour) * https://bugs.ruby-lang.org/issues/20221 + https://github.com/ruby/ruby/pull/9865, which ignore some global symbols that ASAN defines from the global symbol leak checker * https://bugs.ruby-lang.org/issues/20274 + https://github.com/ruby/ruby/pull/10087, which ignores some false positive tests about memory leaks when ASAN is enabl * I updated the ASAN docs in https://github.com/ruby/ruby/pull/9922 to more closely reflect current reality The current state of things is that, by following the instructions in https://github.com/ruby/ruby/blob/master/doc/contributing/building_ruby.md, you can successfully build Ruby with ASAN enabled, however, the test suite has several failures. I'm currently working on addressing these: The next step is to merge https://github.com/ruby/ruby/pull/10122 (https://bugs.ruby-lang.org/issues/20310) which I plan to do next week (I'm currently away on a work trip). That makes sure that VALUEs stored in ASAN fake stacks from threads other than the currently running thread get marked during GC. After that, I need to push up patches for the remaining few issues. I mostly have these patches ready to go already; in fact, last week I got the full `make check` suite passing all tests with ASAN enabled! Once that's working, I'd like to investigate how ASAN can fit into CRuby's CI matrix somewhere so that it _stays_ working, although I have not thought too deeply about this yet. I will provide further updates on this ticket so anybody interested can stay in the loop. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/