public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/65015] LTO produces randomly ordered debug information Date: Wed, 11 Feb 2015 12:24:00 -0000 [thread overview] Message-ID: <bug-65015-4-6Vu9o2Uswc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65015-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65015 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to conchur from comment #2) > Created attachment 34724 [details] > Mini Testcases > > Current results (the -COMPILE things are just out of curiosity): > > SIMPLE-COMPILE: OK > SIMPLE-LINK: OK > LTO-COMPILE: FAIL that's expected to fail > LTO-LINK: FAIL > LTO-OBJDUMP: OK > LTO-EXTERNAL-DEBUG: FAIL > LTO-STRIP-LINK: FAIL > LTO-STRIP-EXTERNAL-DEBUG: FAIL > LTO-BUILDID-LINK: FAIL > LTO-SAVETEMPS-LINK: OK > LTO-SAVETEMPS-EXTERNAL-DEBUG: OK > > The -save-temps was a suggestion by Jérémy Bobbio and shows that there is > still a problem with the random file names when trying to use LTO to create > reproducible builds. At least for the simple one file case -save-temps makes some of the names non-random. I still expect that the patch I just committed plus Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 220613) +++ gcc/dwarf2out.c (working copy) @@ -24521,8 +24521,11 @@ dwarf2out_finish (const char *filename) gen_remaining_tmpl_value_param_die_attribute (); /* Add the name for the main input file now. We delayed this from - dwarf2out_init to avoid complications with PCH. */ - add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); + dwarf2out_init to avoid complications with PCH. + Avoid doing this for LTO produced units as it adds random + tempfile names. */ + if (!in_lto_p) + add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) add_comp_dir_attribute (comp_unit_die ()); else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) will fix all cases. Indeed: > ./t.sh SIMPLE-COMPILE: OK SIMPLE-LINK: OK LTO-COMPILE: FAIL LTO-LINK: OK LTO-OBJDUMP: OK LTO-EXTERNAL-DEBUG: OK LTO-STRIP-LINK: OK LTO-STRIP-EXTERNAL-DEBUG: OK LTO-BUILDID-LINK: OK LTO-SAVETEMPS-LINK: OK LTO-SAVETEMPS-EXTERNAL-DEBUG: OK as expected. >From gcc-bugs-return-476832-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 11 12:26:18 2015 Return-Path: <gcc-bugs-return-476832-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 9229 invoked by alias); 11 Feb 2015 12:26:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 9188 invoked by uid 48); 11 Feb 2015 12:26:14 -0000 From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/65018] Use secure_getenv when available Date: Wed, 11 Feb 2015 12:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: <bug-65018-4-aJFP88k6Wp@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-65018-4@http.gcc.gnu.org/bugzilla/> References: <bug-65018-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01165.txt.bz2 Content-length: 861 https://gcc.gnu.org/bugzilla/show_bug.cgi?ide018 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think LC_ALL/LANG/ and the other LC_* vars are ok as is, at least glibc normally doesn't consider them as unsecvars. But e.g. LOCPATH is considered problematic for suid/sgid. Locales and translations should be picked up by default from directories normal users don't have access to, and localization of suid/sgid is desirable. The main problem is if some env var lets e.g. the program write some file, or significantly change behavior from the behavior that has been tested, etc.
next prev parent reply other threads:[~2015-02-11 12:24 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-11 10:11 [Bug lto/65015] New: " conchur at web dot de 2015-02-11 11:42 ` [Bug lto/65015] " conchur at web dot de 2015-02-11 12:01 ` rguenth at gcc dot gnu.org 2015-02-11 12:24 ` rguenth at gcc dot gnu.org [this message] 2015-02-12 8:42 ` conchur at web dot de 2015-02-12 8:56 ` rguenth at gcc dot gnu.org 2015-02-13 9:36 ` rguenth at gcc dot gnu.org 2015-02-13 9:36 ` rguenth at gcc dot gnu.org 2015-02-13 10:18 ` conchur at web dot de 2015-02-13 11:24 ` rguenth at gcc dot gnu.org 2015-02-13 11:25 ` rguenth at gcc dot gnu.org 2015-02-13 12:45 ` conchur at web dot de 2015-02-13 13:42 ` hjl.tools at gmail dot com 2015-02-13 16:16 ` rguenther at suse dot de 2015-02-13 17:30 ` hjl.tools at gmail dot com 2015-02-13 19:32 ` hjl.tools at gmail dot com 2015-02-13 20:06 ` hjl.tools at gmail dot com 2015-02-14 0:36 ` hjl.tools at gmail dot com 2015-02-16 10:06 ` rguenth at gcc dot gnu.org 2015-02-16 10:08 ` rguenth at gcc dot gnu.org 2015-02-16 14:53 ` rguenth at gcc dot gnu.org 2015-02-16 14:53 ` rguenth at gcc dot gnu.org 2015-02-18 9:26 ` conchur at web dot de 2015-02-24 9:24 ` rguenth at gcc dot gnu.org 2015-02-24 9:27 ` rguenth at gcc dot gnu.org 2015-02-24 12:15 ` rguenth 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-65015-4-6Vu9o2Uswc@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).