[Bug preprocessor/60436] [4.8/4.9 Regression] C preprocessor segfaults on assembly file
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 6 08:30:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60436
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-06
CC| |trippels at gcc dot gnu.org
Known to work| |4.7.3
Target Milestone|--- |4.8.4
Summary|C preprocessor segfaults on |[4.8/4.9 Regression] C
|assembly file |preprocessor segfaults on
| |assembly file
Ever confirmed|0 |1
Known to fail| |4.8.3, 4.9.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Confirmed. Both trunk and 4.8.3 segfault. 4.7.3 is fine.
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.3/cc1 -o /dev/null -E -lang-asm -quiet
-v -D ABCDEFGHIJKLM ghc3240_8.s
#0 0x0000000000c7136e in get_data_from_adhoc_loc(line_maps*, unsigned int) ()
#1 0x0000000000c67fe8 in expand_location(unsigned int) ()
#2 0x00000000004cc7b3 in preprocess_file(cpp_reader*) ()
#3 0x0000000000c806df in c_common_init() ()
#4 0x0000000000c7c90c in c_objc_common_init() ()
#5 0x0000000000cc12fb in toplev_main(int, char**) ()
#6 0x00007ffff7756fb0 in __libc_start_main () from /lib/libc.so.6
#7 0x0000000000c7bb1a in _start ()
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1 -o /dev/null -E -lang-asm -quiet
-v -D ABCDEFGHIJKLM ghc3240_8.s
#0 0x0000000000aeeaac in expand_location_1(unsigned int, bool) [clone
.lto_priv.2583] ()
#1 0x0000000000b60b10 in preprocess_file(cpp_reader*) ()
#2 0x0000000000b53316 in c_common_init() ()
#3 0x0000000000b1190b in c_objc_common_init() ()
#4 0x0000000000aeb141 in toplev_main(int, char**) ()
#5 0x00007ffff7756fb0 in __libc_start_main () from /lib/libc.so.6
#6 0x0000000000ae56e9 in _start ()
Valgrind shows:
==28570== Invalid read of size 4
==28570== at 0xAEEAAC: expand_location_1(unsigned int, bool) [clone
.lto_priv.2583] (in /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB60B0F: preprocess_file(cpp_reader*) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB53315: c_common_init() (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB1190A: c_objc_common_init() (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xAEB140: toplev_main(int, char**) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0x4D70FAF: (below main) (in /lib64/libc-2.19.so)
==28570== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28570==
==28570== Invalid read of size 4
==28570== at 0xAEEAAC: expand_location_1(unsigned int, bool) [clone
.lto_priv.2583] (in /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB6DB50: location_get_source_line(expanded_location, int*) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xAEF365: diagnostic_show_locus(diagnostic_context*,
diagnostic_info const*) (in /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xAEC294: diagnostic_report_diagnostic(diagnostic_context*,
diagnostic_info*) (in /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0x4DC59B: internal_error(char const*, ...) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xA377DB: crash_signal(int) [clone .lto_priv.1176] (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0x4D8508F: ??? (in /lib64/libc-2.19.so)
==28570== by 0xAEEAAB: expand_location_1(unsigned int, bool) [clone
.lto_priv.2583] (in /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB60B0F: preprocess_file(cpp_reader*) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB53315: c_common_init() (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xB1190A: c_objc_common_init() (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== by 0xAEB140: toplev_main(int, char**) (in
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.0/cc1)
==28570== Address 0x610 is not stack'd, malloc'd or (recently) free'd
Could be related to PR58893.
More information about the Gcc-bugs
mailing list