public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/109969] New: Linking large project causes an ICE
@ 2023-05-25 17:43 gaius at gcc dot gnu.org
2023-05-25 17:46 ` [Bug modula2/109969] " gaius at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-05-25 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
Bug ID: 109969
Summary: Linking large project causes an ICE
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gaius at gcc dot gnu.org
Target Milestone: ---
As reported on the gm2 mailing list - linking a large project 80k lines causes
an ICE.
Brief analysis also highlights a bug in M2LexBuf_OpenSource and GetToken (which
sets currenttoken to eoftok) even though the definition module contains correct
code.
I suspect that fixing this bug will also fix PR 108344 (both reference GetToken
- which is due for a re-write).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug modula2/109969] Linking large project causes an ICE
2023-05-25 17:43 [Bug modula2/109969] New: Linking large project causes an ICE gaius at gcc dot gnu.org
@ 2023-05-25 17:46 ` gaius at gcc dot gnu.org
2024-03-07 17:09 ` gaius at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-05-25 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-05-25
--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
I've yet to reproduce the ICE as reported - but certainly see a problem with
GetToken which fails to obtain the first token in a definition module for a
large project.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug modula2/109969] Linking large project causes an ICE
2023-05-25 17:43 [Bug modula2/109969] New: Linking large project causes an ICE gaius at gcc dot gnu.org
2023-05-25 17:46 ` [Bug modula2/109969] " gaius at gcc dot gnu.org
@ 2024-03-07 17:09 ` gaius at gcc dot gnu.org
2024-03-07 19:42 ` cvs-commit at gcc dot gnu.org
2024-03-07 19:43 ` gaius at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-03-07 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 57647
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57647&action=edit
Proposed fix
Here is a proposed fix. The fix contains a re-write of M2LexBuf.mod which
removes the linked list of token buckets and simplifies the implementation
using a dynamic array. It contains more checking (for empty source files for
example).
The patch also contains a fix for an ICE in gcc/m2/gm2-gcc/builtins.cc -
prompting this patch and potential commit once the bootstrap succeeds.
Many of the test modules for this PR now compile. I've not seen the link occur
as there are issues with the test Makefile.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug modula2/109969] Linking large project causes an ICE
2023-05-25 17:43 [Bug modula2/109969] New: Linking large project causes an ICE gaius at gcc dot gnu.org
2023-05-25 17:46 ` [Bug modula2/109969] " gaius at gcc dot gnu.org
2024-03-07 17:09 ` gaius at gcc dot gnu.org
@ 2024-03-07 19:42 ` cvs-commit at gcc dot gnu.org
2024-03-07 19:43 ` gaius at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-07 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:
https://gcc.gnu.org/g:99309b98c2e80a42886da36668e1e8d3d082699e
commit r14-9365-g99309b98c2e80a42886da36668e1e8d3d082699e
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date: Thu Mar 7 19:41:58 2024 +0000
PR modula2/109969 Linking large project causes an ICE
This patch contains a re-write of M2LexBuf.mod which removes the linked
list of token buckets and simplifies the implementation using a dynamic
array. It contains more checking (for empty source files for example).
The patch also contains a fix for an ICE in gcc/m2/gm2-gcc/builtins.cc
gcc/m2/ChangeLog:
PR modula2/109969
* gm2-compiler/M2LexBuf.def (TokenToLineNo): Rename parameter.
(TokenToColumnNo): Rename parameter.
(TokenToLocation): Rename parameter.
(FindFileNameFromToken): Rename parameter.
(DumpTokens): Rewrite comment.
* gm2-compiler/M2LexBuf.mod: Rewrite.
* gm2-compiler/P0SyntaxCheck.bnf (CheckInsertCandidate):
DumpTokens before and after inserting recovery token.
* gm2-gcc/m2builtins.cc (do_target_support_exists): Add
bf_c99_compl case.
* gm2-libs/Indexing.def (InitIndexTuned): New procedure
function.
(IsEmpty): New procedure function.
* gm2-libs/Indexing.mod (InitIndexTuned): New procedure
function.
(IsEmpty): New procedure function.
(Index): New field GrowFactor.
(PutIndice): Use GrowFactor to extend dynamic array.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug modula2/109969] Linking large project causes an ICE
2023-05-25 17:43 [Bug modula2/109969] New: Linking large project causes an ICE gaius at gcc dot gnu.org
` (2 preceding siblings ...)
2024-03-07 19:42 ` cvs-commit at gcc dot gnu.org
@ 2024-03-07 19:43 ` gaius at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-03-07 19:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109969
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing now that the patch has been applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-07 19:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 17:43 [Bug modula2/109969] New: Linking large project causes an ICE gaius at gcc dot gnu.org
2023-05-25 17:46 ` [Bug modula2/109969] " gaius at gcc dot gnu.org
2024-03-07 17:09 ` gaius at gcc dot gnu.org
2024-03-07 19:42 ` cvs-commit at gcc dot gnu.org
2024-03-07 19:43 ` gaius at gcc dot gnu.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).