newer gcc packages in toolchain ppa broke ubsan

Bug #1896458 reported by Serhii Pavlovskyi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-9 (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Committed
Undecided
Unassigned

Bug Description

$ gcc -fsanitize=undefined /dev/null
/usr/bin/ld: unrecognized option '--push-state--no-as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
$ gcc-9 -fsanitize=undefined /dev/null
/usr/bin/ld: unrecognized option '--push-state--no-as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
$ gcc -static-libubsan -fsanitize=undefined /dev/null
/dev/null: file not recognized: File truncated
collect2: error: ld returned 1 exit status
$ gcc --version
gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc-9 --version
gcc-9 (Ubuntu 9.3.0-10ubuntu2~16.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
==========================
the issue is caused by
$ gcc -dumpspecs | grep push
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --push-state --as-needed -lgcc_s --pop-state}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{!fno-use-linker-plugin:%{!fno-lto: -plugin %(linker_plugin_file) -plugin-opt=%(lto_wrapper) -plugin-opt=-fresolution=%u.res %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} }}%{flto|flto=*:%<fcompare-debug*} %{flto} %{fno-lto} %{flto=*} %l %{no-pie:} %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*} %{gz*:%e-gz is not supported in this configuration} -z relro %X %{o*} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} %{!nostdlib:%{fvtable-verify=std: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end} %{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):%{!shared:libasan_preinit%O%s} %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan --no-whole-archive -Bdynamic}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}} %{%:sanitize(thread):%{static-libtsan:%{!shared:-Bstatic --whole-archive -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}} %{%:sanitize(leak):%{static-liblsan:%{!shared:-Bstatic --whole-archive -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}}}} %o %{!nostdlib:%{!nodefaultlibs:%{mmpx:%{fcheck-pointer-bounds: %{static:--whole-archive -lmpx --no-whole-archive %:include(libmpx.spec)%(link_libmpx)} %{!static:%{static-libmpx:-Bstatic --whole-archive} %{!static-libmpx:--push-state --no-as-needed} -lmpx %{!static-libmpx:--pop-state} %{static-libmpx:--no-whole-archive -Bdynamic %:include(libmpx.spec)%(link_libmpx)}}}}%{mmpx:%{fcheck-pointer-bounds:%{!fno-chkp-use-wrappers: %{static:-lmpxwrappers} %{!static:%{static-libmpxwrappers:-Bstatic} -lmpxwrappers %{static-libmpxwrappers: -Bdynamic}}}}}}} %{mmpx:%{fcheck-pointer-bounds:%{!static:%:include(libmpx.spec)%(link_mpx)}}} %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)} %{fgnu-tm:%:include(libitm.spec)%(link_itm)} %(mflib) %{fsplit-stack: --wrap=pthread_create} %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address): %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)} %{static:%ecannot specify -static with -fsanitize=address}} %{%:sanitize(thread): %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)} %{static:%ecannot specify -static with -fsanitize=thread}} %{%:sanitize(undefined):%{static-libubsan:-Bstatic} %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed} -lubsan %{static-libubsan:-Bdynamic} %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}} %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}} %{%:sanitize(leak): %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}}}} %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}
================
specifically by
%{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}
with space on wrong side of closing brace

Revision history for this message
Matthias Klose (doko) wrote :

now fixed in the PPA

Changed in gcc-9 (Ubuntu):
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Serhii, or anyone else affected,

Accepted gcc-10 into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-10/10.3.0-1ubuntu1~20.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-groovy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Serhii, or anyone else affected,

Accepted gcc-9 into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9/9.4.0-1ubuntu1~20.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-9 (Ubuntu Groovy):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Serhii, or anyone else affected,

Accepted gcc-10 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-10/10.3.0-1ubuntu1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Serhii, or anyone else affected,

Accepted gcc-9 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gcc-9/9.4.0-1ubuntu1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gcc-9 (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : [gcc-9/focal] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for focal for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (11.3 KiB)

This bug was fixed in the package gcc-9 - 9.4.0-1ubuntu1~20.04

---------------
gcc-9 (9.4.0-1ubuntu1~20.04) focal-proposed; urgency=medium

  * SRU: LP: #1930125. Update to the GCC 9.4.0 release.

gcc-9 (9.4.0-1ubuntu1) impish; urgency=medium

  * GCC 9.4.0 release.

gcc-9 (9.4.0-1) unstable; urgency=medium

  * GCC 9.4.0 release.
  * Refresh patches.

gcc-9 (9.3.0-26ubuntu1) impish; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-9 (9.3.0-26) experimental; urgency=medium

  * GCC 9.4.0 release candidate 2.
  * Update to git 20210527 from the gcc-9 branch.
    - Fix PR c++/97938, PR c++/52625, PR c++/80456, PR sanitizer/100379,
      PR c++/100797, PR c++/95719.
  * Drop the PR bootstrap/87338 patch, applied upstream.

gcc-9 (9.3.0-25ubuntu1) impish; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-9 (9.3.0-25) experimental; urgency=medium

  * GCC 9.4.0 release candidate.
  * Update to git 20210519 from the gcc-9 branch.
    - Fix PR target/97865 (Darwin), PR target/44107 (Darwin),
      PR target/48097 (Darwin), PR tree-optimization/92608, PR bootstrap/87338,
      PR target/100182 (x86), PR tree-optimization/99954,
      PR rtl-optimization/99929, PR target/98136 (AArch64),
      PR rtl-optimization/96796, PR tree-optimization/98302,
      PR middle-end/95694, PR c++/95719, PR fortran/100154,
      PR target/98952 (PPC), PR libstdc++/100259, PR target/99988 (AArch64),
      PR target/99037 (AArch64), PR target/100441 (AArch64),
      PR rtl-optimization/100225, PR rtl-optimization/84878,
      PR target/100402 (x86), PR rtl-optimization/100263,
      PR tree-optimization/98786, PR rtl-optimization/100230,
      PR tree-optimization/100053, PR rtl-optimization/98144,
      PR target/100375 (nvptx), PR target/100302 (AArch64),
      PR rtl-optimization/100254, PR debug/100255, PR rtl-optimization/100148,
      PR tree-optimization/91914, PR fortran/100274, PR c/100450,
      PR rtl-optimization/80960, PR tree-optimization/96513,
      PR tree-optimization/96597, PR tree-optimization/88240,
      PR tree-optimization/100566.
  * Fix running the libstdc++-v3 tests against the installed libstdc++6,
    when the libstdc++6 package is not built from this source.
  * Don't apply the arm-multilib-soft patch when building without
    armhf/armsf multilib packages.

gcc-9 (9.3.0-24ubuntu1) impish; urgency=medium

  * Merge with Debian; remaining changes:
    - Build from upstream sources.

gcc-9 (9.3.0-24) experimental; urgency=medium

  * Update to git 20210422 from the gcc-9 branch.
    - Fix PR driver/47785, PR tree-optimization/99694, PR c/99224, PR lto/96591,
      PR tree-optimization/97009, PR tree-optimization/99856, PR ipa/99466,
      PR target/97329 (PPC), PR target/99704 (x86), PR target/99702 (RISCV),
      PR ipa/98078, PR tree-optimization/98758, PR tree-optimization/98282,
      PR tree-optimization/93964, PR fortran/99840, PR fortran/99688,
      PR fortran/99545, PR lto/96385, PR bootstrap/99983, PR libstdc++/99985,
      PR libstdc++/96029, PR libstdc++/96029, PR target/99767, PR lto/99849,
      PR rtl-optimization/99905, PR debug/9...

Changed in gcc-9 (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.