public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
@ 2005-10-03 16:15 ` janis187 at us dot ibm dot com
2005-10-14 12:55 ` uros at kss-loka dot si
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: janis187 at us dot ibm dot com @ 2005-10-03 16:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from janis187 at us dot ibm dot com 2005-10-03 16:15 -------
A regression hunt identified this patch from bothner@gcc.gnu.org:
http://gcc.gnu.org/ml/gcc-cvs/2004-02/msg00236.html
--
janis187 at us dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bothner at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
2005-10-03 16:15 ` [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source janis187 at us dot ibm dot com
@ 2005-10-14 12:55 ` uros at kss-loka dot si
2005-10-31 5:57 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2005-10-14 12:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from uros at kss-loka dot si 2005-10-14 12:55 -------
The testcase could be furhter reduced into perhaps the smallest testcase that
ICEs, ever (name this file for example ttt.i):
--cut here--
#
--cut here--
gcc ttt.i
ttt.i:1: internal compiler error: Segmentation fault
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
2005-10-03 16:15 ` [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source janis187 at us dot ibm dot com
2005-10-14 12:55 ` uros at kss-loka dot si
@ 2005-10-31 5:57 ` mmitchel at gcc dot gnu dot org
2005-10-31 16:58 ` bothner at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31 5:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2005-10-31 05:57 -------
Leaving as P2. This really should be fixed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-31 5:57 ` mmitchel at gcc dot gnu dot org
@ 2005-10-31 16:58 ` bothner at gcc dot gnu dot org
2005-10-31 20:20 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-10-31 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bothner at gcc dot gnu dot org 2005-10-31 16:58 -------
The two test cases appear to be unrelated problems.
The inital report is because an invalid line marker is seen before debug_hooks
is set in process_options. fe_enter doesn't normally see an LC_ENTER during
read_original_filename.
One possible fix to to initialize debug_hooks statically in toplev.c:
const struct gcc_debug_hooks *debug_hooks = &do_nothing_debug_hooks;
The other testcase is because _cpp_pop_buffer is called prematurely, because
the code doesn't know we're in a directive.
A possible fix for that is to set/clear pfile->state.in_directive areound the
second _cpp_lex_direct in read_original_filename:
if (token->type == CPP_HASH)
{
pfile->state.in_directive = 1;
token1 = _cpp_lex_direct (pfile);
_cpp_backup_tokens (pfile, 1);
pfile->state.in_directive = 0;
I haven't updated my cvs archive yet, but if someone coudl volunteer to test
these fixes that woudl be appreciated.
--
bothner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-09-28 12:56:06 |2005-10-31 16:58:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2005-10-31 16:58 ` bothner at gcc dot gnu dot org
@ 2005-10-31 20:20 ` pinskia at gcc dot gnu dot org
2005-10-31 20:53 ` bothner at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-31 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-10-31 20:20 -------
I can test the first one since it is an easy one to test.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2005-10-31 20:20 ` pinskia at gcc dot gnu dot org
@ 2005-10-31 20:53 ` bothner at gcc dot gnu dot org
2005-10-31 20:56 ` bothner at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-10-31 20:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from bothner at gcc dot gnu dot org 2005-10-31 20:53 -------
Created an attachment (id=10088)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10088&action=view)
proposed patch for initial testcase
--
bothner at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bothner at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2005-10-31 20:53 ` bothner at gcc dot gnu dot org
@ 2005-10-31 20:56 ` bothner at gcc dot gnu dot org
2005-11-08 10:04 ` uros at kss-loka dot si
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-10-31 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from bothner at gcc dot gnu dot org 2005-10-31 20:56 -------
Created an attachment (id=10090)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10090&action=view)
proposed patch for second testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2005-10-31 20:56 ` bothner at gcc dot gnu dot org
@ 2005-11-08 10:04 ` uros at kss-loka dot si
2005-11-09 6:30 ` uros at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2005-11-08 10:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from uros at kss-loka dot si 2005-11-08 10:04 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00498.html
--
uros at kss-loka dot si changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |11/msg00498.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2005-11-08 10:04 ` uros at kss-loka dot si
@ 2005-11-09 6:30 ` uros at gcc dot gnu dot org
2005-11-09 6:43 ` uros at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: uros at gcc dot gnu dot org @ 2005-11-09 6:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from uros at gcc dot gnu dot org 2005-11-09 06:30 -------
Subject: Bug 24101
Author: uros
Date: Wed Nov 9 06:30:03 2005
New Revision: 106677
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106677
Log:
libcpp/
PR c/24101
* init.c (read_original_filename): Temporarily set
state.in_directive before calling _cpp_lex_direct for
CPP_HASH tokens.
gcc/
PR c/24101
* toplev.c (process_options): Initialize debug_hooks early
in case lang_hooks.post_options ends up calling a debug_hook.
gcc/testsuite/
PR c/24101
* gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
* gcc.dg/dg.exp: Run main loop also for *.i files.
Added:
trunk/gcc/testsuite/gcc.dg/pr24101-1.i
trunk/gcc/testsuite/gcc.dg/pr24101-2.i
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/dg.exp
trunk/gcc/toplev.c
trunk/libcpp/ChangeLog
trunk/libcpp/init.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2005-11-09 6:30 ` uros at gcc dot gnu dot org
@ 2005-11-09 6:43 ` uros at gcc dot gnu dot org
2005-11-09 7:51 ` uros at gcc dot gnu dot org
2005-11-09 7:55 ` uros at kss-loka dot si
11 siblings, 0 replies; 14+ messages in thread
From: uros at gcc dot gnu dot org @ 2005-11-09 6:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from uros at gcc dot gnu dot org 2005-11-09 06:42 -------
Subject: Bug 24101
Author: uros
Date: Wed Nov 9 06:42:53 2005
New Revision: 106678
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106678
Log:
libcpp/
PR c/24101
* init.c (read_original_filename): Temporarily set
state.in_directive before calling _cpp_lex_direct for
CPP_HASH tokens.
gcc/
PR c/24101
* toplev.c (process_options): Initialize debug_hooks early
in case lang_hooks.post_options ends up calling a debug_hook.
gcc/testsuite/
PR c/24101
* gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
* gcc.dg/dg.exp: Run main loop also for *.i files.
Added:
branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr24101-1.i
- copied unchanged from r106677, trunk/gcc/testsuite/gcc.dg/pr24101-1.i
branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr24101-2.i
- copied unchanged from r106677, trunk/gcc/testsuite/gcc.dg/pr24101-2.i
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/dg.exp
branches/gcc-4_0-branch/gcc/toplev.c
branches/gcc-4_0-branch/libcpp/ChangeLog
branches/gcc-4_0-branch/libcpp/init.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2005-11-09 6:43 ` uros at gcc dot gnu dot org
@ 2005-11-09 7:51 ` uros at gcc dot gnu dot org
2005-11-09 7:55 ` uros at kss-loka dot si
11 siblings, 0 replies; 14+ messages in thread
From: uros at gcc dot gnu dot org @ 2005-11-09 7:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from uros at gcc dot gnu dot org 2005-11-09 07:51 -------
Subject: Bug 24101
Author: uros
Date: Wed Nov 9 07:51:51 2005
New Revision: 106679
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106679
Log:
gcc/
PR c/24101
* toplev.c (process_options): Initialize debug_hooks early
in case lang_hooks.post_options ends up calling a debug_hook.
* cppinit.c (read_original_filename): Temporarily set
state.in_directive before calling _cpp_lex_direct for
CPP_HASH tokens.
gcc/testsuite/
PR c/24101
* gcc.dg/pr24101-1.i, gcc.dg/pr24101-2.i: New tests.
* gcc.dg/dg.exp: Run main loop also for *.i files.
Added:
branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr24101-1.i
- copied unchanged from r106677, trunk/gcc/testsuite/gcc.dg/pr24101-1.i
branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/pr24101-2.i
- copied unchanged from r106677, trunk/gcc/testsuite/gcc.dg/pr24101-2.i
Modified:
branches/gcc-3_4-branch/gcc/ChangeLog
branches/gcc-3_4-branch/gcc/cppinit.c
branches/gcc-3_4-branch/gcc/testsuite/ChangeLog
branches/gcc-3_4-branch/gcc/testsuite/gcc.dg/dg.exp
branches/gcc-3_4-branch/gcc/toplev.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2005-11-09 7:51 ` uros at gcc dot gnu dot org
@ 2005-11-09 7:55 ` uros at kss-loka dot si
11 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2005-11-09 7:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from uros at kss-loka dot si 2005-11-09 07:55 -------
Fixed everywhere.
--
uros at kss-loka dot si changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|3.4.0 4.0.0 4.1.0 |3.4.0 4.0.0
Known to work|3.3.3 |3.3.3 3.4.5 4.0.3 4.1.0
Resolution| |FIXED
Target Milestone|4.0.3 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
2005-09-28 12:43 [Bug c/24101] New: " uros at kss-loka dot si
2005-09-28 12:56 ` [Bug c/24101] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-28 21:27 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-28 21:27 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source
2005-09-28 12:43 [Bug c/24101] New: " uros at kss-loka dot si
@ 2005-09-28 12:56 ` pinskia at gcc dot gnu dot org
2005-09-28 21:27 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-28 12:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-28 12:56 -------
Confirmed, backtrace:
#0 0x0804bc76 in fe_file_change (new_map=0xa30cce4)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/c-lex.c:236
#1 0x080997a5 in cb_file_change (pfile=0xa303928, new_map=0xa30cce4)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/c-opts.c:1405
#2 0x084f04f3 in _cpp_do_file_change (pfile=0xa303928, reason=LC_ENTER,
to_file=0xa30e720 "/usr/local/lib/gcc/i686-pc-linux-gnu/4.1.0/include/stddef.h", file_line=1,
sysp=2) at /home/peshtigo/pinskia/src/gnu/gcc/src/libcpp/directives.c:921
#3 0x084f03e8 in do_linemarker (pfile=0xa303928)
at /home/peshtigo/pinskia/src/gnu/gcc/src/libcpp/directives.c:903
#4 0x084efafd in _cpp_handle_directive (pfile=0xa303928, indented=0)
at /home/peshtigo/pinskia/src/gnu/gcc/src/libcpp/directives.c:430
#5 0x084f609b in read_original_filename (pfile=0xa303928)
at /home/peshtigo/pinskia/src/gnu/gcc/src/libcpp/init.c:506
#6 0x084f6015 in cpp_read_main_file (pfile=0xa303928, fname=0xbfff8c42 "t.i")
at /home/peshtigo/pinskia/src/gnu/gcc/src/libcpp/init.c:480
#7 0x0809a0db in c_common_post_options (pfilename=0x86373a8)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/c-opts.c:1046
: Search converges between 2004-02-01-trunk (#445) and 2004-03-01-trunk (#446).
: Search converges between 2004-02-02-3.4 (#1) and 2004-03-01-3.4 (#2).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code,
| |monitored
Known to fail| |3.4.0 4.0.0 4.1.0
Known to work| |3.3.3
Last reconfirmed|0000-00-00 00:00:00 |2005-09-28 12:56:06
date| |
Summary|Segfault with preprocessed |[3.4/4.0/4.1 Regression]
|source |Segfault with preprocessed
| |source
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24101
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-11-09 7:55 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-24101-1649@http.gcc.gnu.org/bugzilla/>
2005-10-03 16:15 ` [Bug c/24101] [3.4/4.0/4.1 Regression] Segfault with preprocessed source janis187 at us dot ibm dot com
2005-10-14 12:55 ` uros at kss-loka dot si
2005-10-31 5:57 ` mmitchel at gcc dot gnu dot org
2005-10-31 16:58 ` bothner at gcc dot gnu dot org
2005-10-31 20:20 ` pinskia at gcc dot gnu dot org
2005-10-31 20:53 ` bothner at gcc dot gnu dot org
2005-10-31 20:56 ` bothner at gcc dot gnu dot org
2005-11-08 10:04 ` uros at kss-loka dot si
2005-11-09 6:30 ` uros at gcc dot gnu dot org
2005-11-09 6:43 ` uros at gcc dot gnu dot org
2005-11-09 7:51 ` uros at gcc dot gnu dot org
2005-11-09 7:55 ` uros at kss-loka dot si
2005-09-28 12:43 [Bug c/24101] New: " uros at kss-loka dot si
2005-09-28 12:56 ` [Bug c/24101] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-28 21:27 ` pinskia at gcc dot gnu dot org
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).