public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/101949] New: git miscompiled with -flto -fipa-pta
@ 2021-08-17 14:25 alex_y_xu at yahoo dot ca
  2021-08-17 14:32 ` [Bug other/101949] " marxin at gcc dot gnu.org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: alex_y_xu at yahoo dot ca @ 2021-08-17 14:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101949

            Bug ID: 101949
           Summary: git miscompiled with -flto -fipa-pta
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alex_y_xu at yahoo dot ca
  Target Milestone: ---

Created attachment 51313
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51313&action=edit
step 2 patch

steps to reproduce:

1. download and unpack git-2.33.0 (other versions may also work)
2. apply the attached patch to work around binutils bugs with duplicate
function names
3. make CFLAGS="-O2 -flto -fipa-pta" git git-remote-https
4. git clone https://github.com/Hello71/empty-project.git
5. PATH=$PWD:$PATH git -C empty-project fetch
6. objdump --disassemble=iterate_ref_map2 git

expected behavior:

step 5 succeeds. in step 6, function references %rsi at some point

actual behavior:

step 5 segfaults. in step 6, function never references %rsi (i.e. returns 0
without populating *oid)

additional behavior:

it works ok without -flto or without -fipa-pta, thus the non-reduced test case.

note that the patch is only required for step 6; step 5 fails even if the patch
is not applied.

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-08-24 11:17 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 14:25 [Bug other/101949] New: git miscompiled with -flto -fipa-pta alex_y_xu at yahoo dot ca
2021-08-17 14:32 ` [Bug other/101949] " marxin at gcc dot gnu.org
2021-08-17 18:38 ` [Bug ipa/101949] " pinskia at gcc dot gnu.org
2021-08-18  7:58 ` marxin at gcc dot gnu.org
2021-08-18  8:01 ` marxin at gcc dot gnu.org
2021-08-18  8:03 ` marxin at gcc dot gnu.org
2021-08-18  8:04 ` [Bug ipa/101949] [11/12 Regression] git miscompiled with -flto -fipa-pta since r11-5061-g85ebbabd85e03bdc marxin at gcc dot gnu.org
2021-08-18 11:33 ` marxin at gcc dot gnu.org
2021-08-18 11:34 ` rguenth at gcc dot gnu.org
2021-08-20 11:00 ` boris2.9 at gmail dot com
2021-08-20 11:44 ` marxin at gcc dot gnu.org
2021-08-20 11:50 ` marxin at gcc dot gnu.org
2021-08-20 11:50 ` marxin at gcc dot gnu.org
2021-08-20 11:59 ` rguenth at gcc dot gnu.org
2021-08-20 12:02 ` rguenth at gcc dot gnu.org
2021-08-20 12:08 ` marxin at gcc dot gnu.org
2021-08-22 18:58 ` cvs-commit at gcc dot gnu.org
2021-08-22 21:47 ` hjl.tools at gmail dot com
2021-08-22 22:30 ` hjl.tools at gmail dot com
2021-08-23  7:54 ` marxin at gcc dot gnu.org
2021-08-23 14:17 ` cvs-commit at gcc dot gnu.org
2021-08-23 14:21 ` [Bug ipa/101949] [11 " marxin at gcc dot gnu.org
2021-08-24  8:25 ` cvs-commit at gcc dot gnu.org
2021-08-24  8:25 ` cvs-commit at gcc dot gnu.org
2021-08-24  8:27 ` marxin at gcc dot gnu.org
2021-08-24 11:17 ` alex_y_xu at yahoo dot ca

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).