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 498C91F44D for ; Mon, 1 Apr 2024 13:20:34 +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=ekvB/qlx; 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=FtOF3MIV; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 4CB2F83B68; Mon, 1 Apr 2024 13:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1711977626; bh=gz44tyXr0vt8mtb+AHTwtmv6BdDuWfQCXkTYBilXZ5Y=; 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=ekvB/qlxQEBIP28FuOwM2Kud+o2p2iOgqrUIblEgSZvMQLgjhMVxaKv6DLeDtvKYJ Zv7disNbPA9YIyDzVcznCSc9ST6ekQ9JxCVop+Jmw1yksTFrvIv3tFekhjwDVFcfxN WVZaX0xblGRNcBXZjLWWR4rVJPQjbBjhMmhGIEw0= Received: from s.wrqvtvvn.outbound-mail.sendgrid.net (s.wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 5679C83B5B for ; Mon, 1 Apr 2024 13:20:23 +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=FtOF3MIV; 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=W7vNxSNFLJ/zlCaqwviMVZqCufhc6Cy0wUpPQP4Raxo=; b=FtOF3MIVFet6zjsxt5Wm7AZl1FDpxtaO+xDN8kNNLDhWMobcDGmunPiIOu0BMvcbyWep 1STt9YirLEZEGglZlL18NDjPFERk5P8iY9YNLYcYw4zorKDV0GxKNKVGK/iEONEDNEMbSB o1BA4R1bkzhaQMjfnQdT5Xo5WXXnBH0C1KqPWNTLIuLWGRba1N1jS0Tsz5JirBS2JVarAJ 3XluQPCI+ROHhz+3NSgUl3CYJ7AECv/FCU0in4aPCdkYfLRcSqvy84mRUHUXWsJEg3YAmR dx4s0Q4md9qcz0U5RJ9gqrhDWWfBtmOjyDT9CbHb3ImWggr3FLomYxbra78yUdbg== Received: by recvd-75c664ffc8-4rs8j with SMTP id recvd-75c664ffc8-4rs8j-1-660AB495-1E 2024-04-01 13:20:21.7947722 +0000 UTC m=+1181996.308703162 Received: from herokuapp.com (unknown) by geopod-ismtpd-13 (SG) with ESMTP id -obETXD9QO6YGxs_RjyvAg for ; Mon, 01 Apr 2024 13:20:21.784 +0000 (UTC) Date: Mon, 01 Apr 2024 13:20:21 +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: 93993 X-SG-EID: =?us-ascii?Q?u001=2EByjZWvxTCjdoV8K03xEuhE7KqN4thWULFLM7+oH78KY30oYB3qFthsDpL?= =?us-ascii?Q?4w4cbYa3ttBh8bAHPOnE=2FkzPba67JNu7Lnrked2?= =?us-ascii?Q?O7K9VQ=2FJax2QNx3XFsYV47zrpJhUNiwRzvceMh+?= =?us-ascii?Q?yhIByYkBE1l6gvE6pq4xzu9JjY3olMF8pa4qdKx?= =?us-ascii?Q?RvebrKNtMj0lyji6LZV+RNcoY4IxCI2S13e2rRN?= =?us-ascii?Q?3xKH6qiziE+SKQHjAra+UldPT=2FlrXEcgCmxfi1X?= =?us-ascii?Q?h05WL4vGGy5fBPU=2Fu5MoxMgI0Q=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: XE3IRSEIXMDGPVXC5HHF6AV5FAR5ZCN2 X-Message-ID-Hash: XE3IRSEIXMDGPVXC5HHF6AV5FAR5ZCN2 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:117398] [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-11: > * Could we get an ASAN build of ruby into setup-ruby? This would make it easier to use ASAN with github actions and the like. How about making ASAN enabled for ruby-debug builds at https://github.com/ruby/ruby-dev-builder/blob/b0bf59a17c17985d4692243d4689c273f6348fa5/.github/workflows/build.yml#L126-L130 ? ---------------------------------------- Misc #20387: Meta-ticket for ASAN support https://bugs.ruby-lang.org/issues/20387#change-107558 * 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/