[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #18 from Jakub Jelinek --- Fixed.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #17 from Jakub Jelinek --- Author: jakub Date: Tue May 30 07:34:46 2017 New Revision: 248616 URL: https://gcc.gnu.org/viewcvs?rev=248616=gcc=rev Log: Backported from mainline 2016-10-05 Jakub JelinekPR sanitizer/66343 * ubsan.c (ubsan_ids): New GTY(()) array. (ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids instead of static local counters. * gcc.dg/pch/pr66343-1.c: New test. * gcc.dg/pch/pr66343-1.hs: New file. * gcc.dg/pch/pr66343-2.c: New test. * gcc.dg/pch/pr66343-2.hs: New file. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/pch/pr66343-1.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/pch/pr66343-1.hs branches/gcc-5-branch/gcc/testsuite/gcc.dg/pch/pr66343-2.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/pch/pr66343-2.hs Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/ubsan.c
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #16 from Jakub Jelinek --- Fixed for 6.3+ as well.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #15 from Jakub Jelinek --- Author: jakub Date: Wed Dec 7 22:39:29 2016 New Revision: 243391 URL: https://gcc.gnu.org/viewcvs?rev=243391=gcc=rev Log: Backported from mainline 2016-10-05 Jakub JelinekPR sanitizer/66343 * ubsan.c (ubsan_ids): New GTY(()) array. (ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids instead of static local counters. * gcc.dg/pch/pr66343-1.c: New test. * gcc.dg/pch/pr66343-1.hs: New file. * gcc.dg/pch/pr66343-2.c: New test. * gcc.dg/pch/pr66343-2.hs: New file. Added: branches/gcc-6-branch/gcc/testsuite/gcc.dg/pch/pr66343-1.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/pch/pr66343-1.hs branches/gcc-6-branch/gcc/testsuite/gcc.dg/pch/pr66343-2.c branches/gcc-6-branch/gcc/testsuite/gcc.dg/pch/pr66343-2.hs Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/ubsan.c
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #14 from Marc Mutz --- More examples (incl. ones with .Lubsan_type3) available on request.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Marc Mutz changed: What|Removed |Added CC||marc.mutz at kdab dot com --- Comment #13 from Marc Mutz --- Created attachment 39769 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39769=edit Preprocessed source for a TU that fails Command line for a TU that fails: g++ -c -include .pch/Qt5Core -pipe -g -O3 -std=c++1z \ -I/usr/include/glib-2.0 \ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include \ -pthread \ -fvisibility=hidden \ -fvisibility-inlines-hidden \ -fsanitize=address \ -fsanitize=undefined \ -fno-omit-frame-pointer \ -Wall \ -W \ -Wvla \ -Wdate-time \ -Wshift-overflow=2 \ -Wduplicated-cond \ -Werror \ -Wno-error=cpp \ -Wno-error=deprecated-declarations \ -Wno-error=strict-overflow \ -D_REENTRANT \ -fPIC \ -DQT_NO_USING_NAMESPACE \ -DQT_NO_FOREACH \ -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" \ -DQT_USE_ICU \ -DQT_HAVE_POLL \ -DQT_HAVE_PPOLL \ -DQT_BUILD_CORE_LIB \ -DQT_BUILDING_QT \ -DQT_NO_CAST_TO_ASCII \ -DQT_ASCII_CAST_WARNINGS \ -DQT_MOC_COMPAT \ -DQT_USE_QSTRINGBUILDER \ -DQT_DEPRECATED_WARNINGS \ -DQT_DISABLE_DEPRECATED_BEFORE=0x05 \ -D_LARGEFILE64_SOURCE \ -D_LARGEFILE_SOURCE \ -DQT_NO_DEBUG \ -I/home/marc/Qt/qt5/qtbase/src/corelib \ -I. \ -Iglobal \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/harfbuzz/src \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/md5 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/md4 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/sha3 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/forkfd \ -I../../include \ -I../../include/QtCore \ -I../../include/QtCore/5.8.0 \ -I../../include/QtCore/5.8.0/QtCore \ -I.moc \ -I/home/marc/Qt/qt5/qtbase/mkspecs/linux-g++ \ -o .obj/qlibraryinfo.o \ /home/marc/Qt/qt5/qtbase/src/corelib/global/qlibraryinfo.cpp Fails with: {standard input}: Assembler messages: {standard input}:22992: Error: symbol `.Lubsan_type1' is already defined
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #12 from Marc Mutz --- Created attachment 39768 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39768=edit Preprocessed source for PCH Command line for PCH file: g++ -pipe -g -O3 -std=c++1z \ -I/usr/include/glib-2.0 \ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include \ -pthread \ -fvisibility=hidden \ -fvisibility-inlines-hidden \ -fsanitize=address \ -fsanitize=undefined \ -fno-omit-frame-pointer \ -Wall \ -W \ -Wvla \ -Wdate-time \ -Wshift-overflow=2 \ -Wduplicated-cond \ -Werror \ -Wno-error=cpp \ -Wno-error=deprecated-declarations \ -Wno-error=strict-overflow \ -D_REENTRANT \ -fPIC \ -DQT_NO_USING_NAMESPACE \ -DQT_NO_FOREACH \ -DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" \ -DQT_USE_ICU \ -DQT_HAVE_POLL \ -DQT_HAVE_PPOLL \ -DQT_BUILD_CORE_LIB \ -DQT_BUILDING_QT \ -DQT_NO_CAST_TO_ASCII \ -DQT_ASCII_CAST_WARNINGS \ -DQT_MOC_COMPAT \ -DQT_USE_QSTRINGBUILDER \ -DQT_DEPRECATED_WARNINGS \ -DQT_DISABLE_DEPRECATED_BEFORE=0x05 \ -D_LARGEFILE64_SOURCE \ -D_LARGEFILE_SOURCE \ -DQT_NO_DEBUG \ -I/home/marc/Qt/qt5/qtbase/src/corelib \ -I. \ -Iglobal \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/harfbuzz/src \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/md5 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/md4 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/sha3 \ -I/home/marc/Qt/qt5/qtbase/src/3rdparty/forkfd \ -I../../include \ -I../../include/QtCore \ -I../../include/QtCore/5.8.0 \ -I../../include/QtCore/5.8.0/QtCore \ -I.moc \ -I/home/marc/Qt/qt5/qtbase/mkspecs/linux-g++ \ -x c++-header \ -c /home/marc/Qt/qt5/qtbase/src/corelib/global/qt_pch.h \ -o .pch/Qt5Core.gch/c++ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/d/gcc/trunk --enable-checking=release --enable-languges=c,c++,fortran,lto,objc,obj-c++ Thread model: posix gcc version 7.0.0 20161005 (experimental) (GCC) git log -10 --oneline c7b01e7 PR sanitizer/77823 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0 is not integral. d20 Fix pr69941.c test failure for avr ea55eab 2016-10-05 Jerry DeLisle9ce1157 PR bootstrap/77819 - undefined reference to gnu_libc_printf_pointer_format with uClibc 5c176eb * c-common.c (c_common_reswords): Update comment for C++11. 4ef2832 [fold-const] Fix native_encode_real for HFmode constants 59deb1a 70564 fix newly-added tests for not_fn c375ef0 libcpp/ChangeLog: 77a1a89 Move all existing strchr and strrchr folding from builtins.c to gimple-fold.c. ad69f5a PR 70101 fix allocator-extended ctors for std::priority_queue
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #11 from Jakub Jelinek --- The #c3 testcase works now, so if you have something different you can reproduce it on, please attach preprocessed source for the PCH header and preprocessed source of the c/c++ source with the PCH header unincluded plus command lines.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #10 from marc at kdab dot com --- I cannot confirm that this is fixed in 7.0.0 20161005. This is at commit: PR sanitizer/77823. I still see these errors.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Jakub Jelinek changed: What|Removed |Added Known to work||7.0 --- Comment #9 from Jakub Jelinek --- Fixed on the trunk so far.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #8 from Jakub Jelinek --- Author: jakub Date: Wed Oct 5 19:04:39 2016 New Revision: 240804 URL: https://gcc.gnu.org/viewcvs?rev=240804=gcc=rev Log: PR sanitizer/66343 * ubsan.c (ubsan_create_data): Call initialize_sanitizer_builtins here. (ubsan_instrument_float_cast): And not here. * c-ubsan.c (ubsan_instrument_return): Don't call initialize_sanitizer_builtins here. * gcc.dg/pch/pr66343-3.c: New test. * gcc.dg/pch/pr66343-3.hs: New file. Added: trunk/gcc/testsuite/gcc.dg/pch/pr66343-3.c trunk/gcc/testsuite/gcc.dg/pch/pr66343-3.hs Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-ubsan.c trunk/gcc/testsuite/ChangeLog trunk/gcc/ubsan.c
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #7 from Jakub Jelinek --- Author: jakub Date: Wed Oct 5 19:03:28 2016 New Revision: 240803 URL: https://gcc.gnu.org/viewcvs?rev=240803=gcc=rev Log: PR sanitizer/66343 * ubsan.c (ubsan_ids): New GTY(()) array. (ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids instead of static local counters. * gcc.dg/pch/pr66343-1.c: New test. * gcc.dg/pch/pr66343-1.hs: New file. * gcc.dg/pch/pr66343-2.c: New test. * gcc.dg/pch/pr66343-2.hs: New file. Added: trunk/gcc/testsuite/gcc.dg/pch/pr66343-1.c trunk/gcc/testsuite/gcc.dg/pch/pr66343-1.hs trunk/gcc/testsuite/gcc.dg/pch/pr66343-2.c trunk/gcc/testsuite/gcc.dg/pch/pr66343-2.hs Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/ubsan.c
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- Created attachment 39755 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39755=edit gcc7-pr66343.patch Untested fix.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Richard Biener changed: What|Removed |Added Component|pch |sanitizer --- Comment #5 from Richard Biener --- sanitizer issue.
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 Simon Lindholm changed: What|Removed |Added CC||simon.lindholm10 at gmail dot com --- Comment #3 from Simon Lindholm --- Seems to happen when both source and precompiled header files contain a division: $ echo "void div1(int a, int b) { a / b; }" >header.h $ echo "void div2(int a, int b) { a / b; }" >src.cpp $ g++ -fsanitize=undefined header.h $ g++ -fsanitize=undefined -include header.h src.cpp /tmp/ccoYhDz6.s: Assembler messages: /tmp/ccoYhDz6.s:69: Error: symbol `.Lubsan_data0' is already defined (reproduced on gcc 6.1.1)
[Bug sanitizer/66343] "Error: .Lubsan_type3 already defined" with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 marc at kdab dot com changed: What|Removed |Added CC||marc at kdab dot com --- Comment #2 from marc at kdab dot com --- Confirmed that GCC 6.0.0 trunk, too, fails with identical errors when trying to compile Qt 5 with PCH. Only on some files, though. 213 object files get created for QtCore, 50 fail.
[Bug sanitizer/66343] Error: .Lubsan_type3 already defined with UBSan and precompiled headers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66343 --- Comment #1 from Roger Orr rogero at howzatt dot demon.co.uk --- Fails for me (with a very slightly different label: Lubsan_type0) on gcc-trunk (as of 2015-08-22) without needing the -m32: $ /usr/share/gcc-trunk/bin/gcc -v Using built-in specs. COLLECT_GCC=/usr/share/gcc-trunk/bin/gcc COLLECT_LTO_WRAPPER=/usr/share/gcc-trunk/libexec/gcc/x86_64-unknown-cygwin/6.0.0/lto-wrapper.exe Target: x86_64-unknown-cygwin Configured with: /cygdrive/c/projects/gcc/objdir/../gcctrunk/configure --enable-languages=c,c++ --prefix=/usr/share/gcc-trunk : (reconfigured) ../gcctrunk/configure --prefix=/usr/share/gcc-trunk/ : (reconfigured) ../gcctrunk/configure --prefix=/usr/share/gcc-trunk/ --enable-languages=c,c++ Thread model: single gcc version 6.0.0 20150822 (experimental) (GCC) $ /usr/share/gcc-trunk/bin/g++ -o stdc++.h.gch -x c++-header /usr/share/gcc-tru nk/include/c++/6.0.0/x86_64-unknown-cygwin/bits/stdc++.h -fsanitize=undefined $ /usr/share/gcc-trunk/bin/g++ -o test test.cpp -I. -include stdc++.h -fsanitize=undefined -Winvalid-pch gwin /tmp/ccJdB2eu.s: Assembler messages: /tmp/ccJdB2eu.s:171: Error: symbol `.Lubsan_type0' is already defined