lburg - fix strchr when buffer doesn't have an eol.#23
Open
ksherlock wants to merge 1 commit into
Open
Conversation
if strchr(bp, '\n') didn't find anything the first time, it won't find anything the second time, either. Change to '\0' to find the end-of-line. It's still a syntax error (the grammar requires a '\n') but it won't cause an alloc error.
AJBats
added a commit
to AJBats/saturncc
that referenced
this pull request
Apr 18, 2026
Six variants of the fixed-point 4x4 matrix-multiply pattern (same inner arithmetic as drh#23, with different register/ptr aliases). Adds DAT_06045070, PTR_DAT_06045074, DAT_060450e4, PTR_DAT_060450e8 to shim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AJBats
added a commit
to AJBats/saturncc
that referenced
this pull request
Apr 18, 2026
…ll assign relaxation Bulk unwrap via scripted #if 0 removal for 21 functions. All are variations on the same fixed-point matrix/vector primitives seen in drh#23-drh#29, with occasional void-returning intra-TU callees whose return value Ghidra still reads. rcc fix (enode.c + expr.c): accept 'lhs = void_call(...)' by treating a void-returning call as producing an int-sized value in the SH-2 return register r0. Previously errored 'operands of = have illegal types unsigned long and void' and hit a cast/btot assertion for VOID src. Relaxation: - assign(): return lhs type when rhs is voidtype and lhs is arithmetic or pointer (before the size-zero early-exit). - cast(): VOID case rebuilds CALL trees with op = CALL+dst so codegen actually materializes a value. Shim additions: pcRam060452{58,5c}, PTR_FUN_0604539c, PTR_SUB_060453a0, PTR_DAT_060453a{4,c}, PTR_FUN_060453b4, puRam060453c{0,4}, puRam0604559{4,8}, DAT_060455{ee,f0,fc}, DAT_06045{600,608,60c,610}, PTR_FUN_060455f{4,8}, PTR_LAB_06045604, DAT_06045608 (code*), uRam060451f4, DAT_0604514c, PTR_DAT_06045150. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
if
strchr(bp, '\n')didn't find anything the first time, it won't find anything the second time, either.Change to
'\0'to find the end-of-line. It's still a syntax error (the grammar requires a'\n') but it won't cause an alloc error.This is only an issue if there's no end-of-line while lexing a rule's cost code (so not a problem with any of lcc's files).