* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
@ 2012-01-01 11:11 ` paolo.carlini at oracle dot com
2012-01-02 10:16 ` rguenth at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-01 11:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-01-01
Ever Confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-01 11:10:45 UTC ---
Please provide all the required information, in particular the preprocessed
.ii: http://gcc.gnu.org/bugs/#need
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
2012-01-01 11:11 ` [Bug c++/51722] " paolo.carlini at oracle dot com
@ 2012-01-02 10:16 ` rguenth at gcc dot gnu.org
2012-01-02 15:06 ` ylalym at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-02 10:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-02 10:15:57 UTC ---
Try disabling PCH, too. If PCH is required to reproduce the bug also
include all preprocessed headers to build the PCH.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
2012-01-01 11:11 ` [Bug c++/51722] " paolo.carlini at oracle dot com
2012-01-02 10:16 ` rguenth at gcc dot gnu.org
@ 2012-01-02 15:06 ` ylalym at gmail dot com
2012-01-02 15:16 ` ylalym at gmail dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-02 15:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #3 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-02 15:06:30 UTC ---
Without PCH errors aren't present.
> all preprocessed headers to build the PCH
#include <stdio.h>
It is enough one header for error origin.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (2 preceding siblings ...)
2012-01-02 15:06 ` ylalym at gmail dot com
@ 2012-01-02 15:16 ` ylalym at gmail dot com
2012-01-02 18:50 ` ylalym at gmail dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-02 15:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #4 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-02 15:16:03 UTC ---
main.cpp
-----------------------------------
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
-----------------------------------
pch.h
-----------------------------------
#include <stdio.h>
g++-4.7 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W
-D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I.
-I/usr/include/QtCore -I/usr/include -I. -x c++-header -c pch.h -o
untitled5.gch/c++
g++-4.7 -c -include untitled5 -m64 -pipe -g3 -gdwarf-4
-fvar-tracking-assignments -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include -I.
-o main.o main.cpp
*** glibc detected *** /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus:
double free or corruption (out): 0x000000100000c180 ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (3 preceding siblings ...)
2012-01-02 15:16 ` ylalym at gmail dot com
@ 2012-01-02 18:50 ` ylalym at gmail dot com
2012-01-02 18:58 ` ylalym at gmail dot com
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-02 18:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #5 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-02 18:50:23 UTC ---
gcc-4.7 -v
Using built-in specs.
COLLECT_GCC=gcc-4.7
COLLECT_LTO_WRAPPER=/usr/local/lib/gcc/x86_64-suse-linux/4.7.0/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr/local --libdir=/usr/local/lib64
--libexecdir=/usr/local/lib64 --enable-languages=c,c++
--enable-checking=release --with-gxx-include-dir=/usr/local/include/c++/4.7
--enable-ssp --disable-libssp --disable-plugin --with-pkgversion='SUSE Linux'
--disable-libgcj --with-slibdir=/lib64 --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.7
--enable-linux-futex --without-system-libunwind --with-tune=core2
--build=x86_64-suse-linux : (reconfigured) ../configure --prefix=/usr/local
--libdir=/usr/local/lib64 --libexecdir=/usr/local/lib64
--enable-languages=c,c++ --enable-checking=release
--with-gxx-include-dir=/usr/local/include/c++/4.7 --enable-ssp --disable-libssp
--disable-plugin --with-pkgversion='SUSE Linux' --disable-libgcj
--with-slibdir=/lib64 --enable-__cxa_atexit --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-version-specific-runtime-libs
--program-suffix=-4.7 --enable-linux-futex --without-system-libunwind
--with-tune=core2 --build=x86_64-suse-linux
Thread model: posix
gcc version 4.7.0 20120102 (experimental) (SUSE Linux)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (4 preceding siblings ...)
2012-01-02 18:50 ` ylalym at gmail dot com
@ 2012-01-02 18:58 ` ylalym at gmail dot com
2012-01-03 4:39 ` hp at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-02 18:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #6 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-02 18:57:40 UTC ---
Created attachment 26220
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26220
For example in Comment 4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (5 preceding siblings ...)
2012-01-02 18:58 ` ylalym at gmail dot com
@ 2012-01-03 4:39 ` hp at gcc dot gnu.org
2012-01-03 6:05 ` ylalym at gmail dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu.org @ 2012-01-03 4:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hp at gcc dot gnu.org
--- Comment #7 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-01-03 04:39:05 UTC ---
(In reply to comment #6)
> Created attachment 26220 [details]
> For example in Comment 4
Sorry, that file contains a reference to precompiled headers:
#pragma GCC pch_preprocess "./untitled5.gch/c++"
so we'd need "all preprocessed headers to build the PCH" (I'm not sure how to
find those from the above line). On a somewhat closer look, the precompiled
header is found within the Qt-headers, so maybe you just need to rebuild *that*
without precompiled headers to create a debuggable context we can use.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (6 preceding siblings ...)
2012-01-03 4:39 ` hp at gcc dot gnu.org
@ 2012-01-03 6:05 ` ylalym at gmail dot com
2012-01-03 6:08 ` ylalym at gmail dot com
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-03 6:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #8 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-03 06:05:23 UTC ---
Created attachment 26224
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26224
new example
--------------------
main.cpp
--------------------
int main()
{
return 0;
}
--------------------
pch.h
--------------------
#include <stdio.h>
>>>>>> -g2
g++-4.7 -m64 -pipe -g2 -gdwarf-4 -fvar-tracking-assignments -Wall -W
-D_REENTRANT -x c++-header -c pch.h -o untitled5.gch/c++
g++-4.7 -c -include untitled5 -m64 -pipe -g2 -gdwarf-4
-fvar-tracking-assignments -Wall -W -D_REENTRANT -o main.o main.cpp
g++-4.7 -m64 -o untitled5 main.o -L/usr/lib64 -lpthread
good
>>>>>> -g3
g++-4.7 -m64 -pipe -g3 -gdwarf-4 -fvar-tracking-assignments -Wall -W
-D_REENTRANT -x c++-header -c pch.h -o untitled5.gch/c++
g++-4.7 -c -include untitled5 -m64 -pipe -g3 -gdwarf-4
-fvar-tracking-assignments -Wall -W -D_REENTRANT -o main.o main.cpp
*** glibc detected *** /usr/local/lib/gcc/x86_64-suse-linux/4.7.0/cc1plus:
munmap_chunk(): invalid pointer: 0x000000100000ba20 ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (7 preceding siblings ...)
2012-01-03 6:05 ` ylalym at gmail dot com
@ 2012-01-03 6:08 ` ylalym at gmail dot com
2012-01-03 6:17 ` ylalym at gmail dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-03 6:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #9 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-03 06:08:14 UTC ---
Created attachment 26225
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26225
And pch.ii
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (8 preceding siblings ...)
2012-01-03 6:08 ` ylalym at gmail dot com
@ 2012-01-03 6:17 ` ylalym at gmail dot com
2012-01-03 6:18 ` ylalym at gmail dot com
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-03 6:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #10 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-03 06:17:03 UTC ---
Created attachment 26226
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26226
only main with empty pch
--------------------
main.cpp
--------------------
int main()
{
return 0;
}
--------------------
pch.h
--------------------
// Empty
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/51722] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (9 preceding siblings ...)
2012-01-03 6:17 ` ylalym at gmail dot com
@ 2012-01-03 6:18 ` ylalym at gmail dot com
2012-01-03 9:08 ` [Bug pch/51722] [4.7 Regression] " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ylalym at gmail dot com @ 2012-01-03 6:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #11 from Yuriy Lalym <ylalym at gmail dot com> 2012-01-03 06:17:49 UTC ---
Created attachment 26227
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26227
And pch.ii
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug pch/51722] [4.7 Regression] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (10 preceding siblings ...)
2012-01-03 6:18 ` ylalym at gmail dot com
@ 2012-01-03 9:08 ` rguenth at gcc dot gnu.org
2012-01-03 9:55 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-03 9:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
CC| |dodji at gcc dot gnu.org
Component|c++ |pch
Target Milestone|--- |4.7.0
Summary|Options "-g3" or "-ggdb3" |[4.7 Regression] Options
|or "-g3 -gdwarf-2" and |"-g3" or "-ggdb3" or "-g3
|other "-g..level3" - |-gdwarf-2" and other
|internal compiler error |"-g..level3" - internal
| |compiler error
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-03 09:07:39 UTC ---
Confirmed with the recipie in comment #8 (using glibc 2.11.1 headers). It's
enough to use -g3 vs. -g2, suspect Dodji's work here.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff61f4f58 in *__GI___libc_free (mem=0x10000030b0) at malloc.c:3736
3736 malloc.c: No such file or directory.
in malloc.c
(gdb) up
#1 0x00000000009cf9c7 in output_macinfo ()
at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:20940
20940 free (CONST_CAST (char *, ref->info));
(gdb) p *ref
$2 = {code = 5 '\005', lineno = 1, info = 0x10000030b0 "__STDC__ 1"}
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug pch/51722] [4.7 Regression] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (11 preceding siblings ...)
2012-01-03 9:08 ` [Bug pch/51722] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2012-01-03 9:55 ` jakub at gcc dot gnu.org
2012-01-03 13:46 ` jakub at gcc dot gnu.org
2012-01-03 13:48 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 9:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 09:54:42 UTC ---
Created attachment 26230
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26230
gcc47-pr51722.patch
Untested fix.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug pch/51722] [4.7 Regression] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (12 preceding siblings ...)
2012-01-03 9:55 ` jakub at gcc dot gnu.org
@ 2012-01-03 13:46 ` jakub at gcc dot gnu.org
2012-01-03 13:48 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 13:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 13:45:47 UTC ---
Author: jakub
Date: Tue Jan 3 13:45:41 2012
New Revision: 182845
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182845
Log:
PR pch/51722
* dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define,
dwarf2out_undef): Allocate e.info using ggc_strdup instead
of xstrdup.
(output_macinfo_op): Don't ggc_strdup fd->filename.
(optimize_macinfo_range): Allocate grp_name using XALLOCAVEC,
then ggc_strdup it. Don't free inc->info or cur->info.
(output_macinfo): Don't free ref->info or file->info.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug pch/51722] [4.7 Regression] Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error
2011-12-31 17:31 [Bug c++/51722] New: Options "-g3" or "-ggdb3" or "-g3 -gdwarf-2" and other "-g..level3" - internal compiler error ylalym at gmail dot com
` (13 preceding siblings ...)
2012-01-03 13:46 ` jakub at gcc dot gnu.org
@ 2012-01-03 13:48 ` jakub at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51722
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 13:47:48 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread