public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/60436] [4.8/4.9 Regression] C preprocessor segfaults on assembly file
Date: Thu, 06 Mar 2014 08:30:00 -0000	[thread overview]
Message-ID: <bug-60436-4-QREHGP3nBR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60436-4@http.gcc.gnu.org/bugzilla/>

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.


  reply	other threads:[~2014-03-06  8:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06  2:05 [Bug preprocessor/60436] New: " dan.doel at gmail dot com
2014-03-06  8:30 ` trippels at gcc dot gnu.org [this message]
2014-03-06  9:24 ` [Bug preprocessor/60436] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2014-03-06 10:29 ` trippels at gcc dot gnu.org
2014-03-06 10:40 ` trippels at gcc dot gnu.org
2014-03-06 14:09 ` trippels at gcc dot gnu.org
2014-03-06 14:31 ` trippels at gcc dot gnu.org
2014-03-06 18:09 ` joseph at codesourcery dot com
2014-03-31  9:31 ` rguenth at gcc dot gnu.org
2014-11-24 12:29 ` [Bug preprocessor/60436] [4.8/4.9/5 " jakub at gcc dot gnu.org
2014-11-25 11:17 ` jakub at gcc dot gnu.org
2014-11-28 13:37 ` jakub at gcc dot gnu.org
2014-11-28 17:06 ` jakub at gcc dot gnu.org
2014-11-28 17:11 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60436-4-QREHGP3nBR@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).