public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location)
       [not found] <bug-88974-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-15 11:58 ` dcb314 at hotmail dot com
  2020-03-16 14:25 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2020-03-15 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88974

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
Interestingly, a valgrind enabled version of recent gcc trunk does this:

./c-c++-common/cpp/pr88974.c:4:31: error: missing terminating > character
    4 | #if __has_include (<pr88974.h)
      |                               ^
./c-c++-common/cpp/pr88974.c:4:31: error: missing ')' after "__has_include"
operand
==48268== Conditional jump or move depends on uninitialised value(s)
==48268==    at 0x165057A: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2918)
==48268==    by 0x163CA9C: _cpp_parse_expr (expr.c:1308)
==48268==    by 0x1635B41: do_if(cpp_reader*) (directives.c:2018)
==48268==    by 0x163780A: _cpp_handle_directive (directives.c:541)


Maybe the fix could be tidied up a bit ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location)
       [not found] <bug-88974-4@http.gcc.gnu.org/bugzilla/>
  2020-03-15 11:58 ` [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location) dcb314 at hotmail dot com
@ 2020-03-16 14:25 ` jakub at gcc dot gnu.org
  2020-03-17  8:44 ` jakub at gcc dot gnu.org
  2022-10-22 18:30 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-16 14:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88974

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48042
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48042&action=edit
gcc10-pr88974.patch

Untested fix for that.  Or instead set result->src_loc to result->src_loc =
pfile->line_table->highest_line; ?
Dunno what is better.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location)
       [not found] <bug-88974-4@http.gcc.gnu.org/bugzilla/>
  2020-03-15 11:58 ` [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location) dcb314 at hotmail dot com
  2020-03-16 14:25 ` jakub at gcc dot gnu.org
@ 2020-03-17  8:44 ` jakub at gcc dot gnu.org
  2022-10-22 18:30 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-17  8:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88974

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48049
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48049&action=edit
gcc10-pr88974.patch

Unfortunately, that patch failed bootstrap miserably (e.g. the compiler
generated __static_initialization_and_destruction_0 then has UNKNOWN_LOCATION
and ICEs because of that).
And this updated patch, while it bootstrapped, had quite a few testsuite
regressions.  So, I'm afraid I don't know where would in some cases the src_loc
be preinitialized from earlier and where it wouldn't.  Mystery.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location)
       [not found] <bug-88974-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-03-17  8:44 ` jakub at gcc dot gnu.org
@ 2022-10-22 18:30 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2022-10-22 18:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88974

--- Comment #7 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Jakub Jelinek from comment #6)
> And this updated patch, while it bootstrapped, had quite a few testsuite
> regressions.  So, I'm afraid I don't know where would in some cases the
> src_loc be preinitialized from earlier and where it wouldn't.  Mystery.

Thanks for looking into this. It doesn't look all that important to me,
but, for the record, it is still producing valgrind errors over 2 years later:

./c-c++-common/cpp/pr88974.c:4:31: error: missing terminating > character
    4 | #if __has_include (<pr88974.h)
      |                               ^
./c-c++-common/cpp/pr88974.c:4:31: error: missing ')' after "__has_include"
operand
==24548== Conditional jump or move depends on uninitialised value(s)
==24548==    at 0x1D21FD4: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.cc:3044)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-22 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-88974-4@http.gcc.gnu.org/bugzilla/>
2020-03-15 11:58 ` [Bug preprocessor/88974] [9 Regression] ICE: Segmentation fault (in linemap_resolve_location) dcb314 at hotmail dot com
2020-03-16 14:25 ` jakub at gcc dot gnu.org
2020-03-17  8:44 ` jakub at gcc dot gnu.org
2022-10-22 18:30 ` dcb314 at hotmail dot com

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).