public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug go/101407] non-determinism in -fdump-go-spec Date: Sun, 18 Jul 2021 23:29:13 +0000 [thread overview] Message-ID: <bug-101407-4-nDnZWwMGml@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101407-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101407 --- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:31b76a815fc177dd579adc03b671ba9a8846ae6c commit r11-8771-g31b76a815fc177dd579adc03b671ba9a8846ae6c Author: Jakub Jelinek <jakub@redhat.com> Date: Wed Jul 14 10:22:50 2021 +0200 godump: Fix -fdump-go-spec= reproduceability issue [PR101407] pot_dummy_types is a hash_set from whose traversal the code prints some type lines. hash_set normally uses default_hash_traits which for pointer types (the hash set hashes const char *) uses pointer_hash which hashes the addresses of the pointers except of the least significant 3 bits. With address space randomization, that results in non-determinism in the -fdump-go-specs= generated file, each invocation can have different order of the lines emitted from pot_dummy_types traversal. This patch fixes it by hashing the string contents instead to make the hashes reproduceable. 2021-07-14 Jakub Jelinek <jakub@redhat.com> PR go/101407 * godump.c (godump_str_hash): New type. (godump_container::pot_dummy_types): Use string_hash instead of ptr_hash in the hash_set. (cherry picked from commit 3be762c2ed79e36b9c8faaea2be04725c967a34e)
next prev parent reply other threads:[~2021-07-18 23:29 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-10 21:34 [Bug go/101407] New: " toolybird at tuta dot io 2021-07-10 23:45 ` [Bug go/101407] " toolybird at tuta dot io 2021-07-11 4:49 ` toolybird at tuta dot io 2021-07-12 13:09 ` jakub at gcc dot gnu.org 2021-07-13 0:49 ` toolybird at tuta dot io 2021-07-14 8:23 ` cvs-commit at gcc dot gnu.org 2021-07-18 23:29 ` cvs-commit at gcc dot gnu.org [this message] 2022-05-10 8:19 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:21 ` cvs-commit at gcc dot gnu.org 2022-05-11 6:36 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101407-4-nDnZWwMGml@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).