hotfix: fix malformed string literals in safety.el/sessions.el that break elc #77
Reference in New Issue
Block a user
Delete Branch "hotfix/elc-source-typos"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix malformed string literals that break elc compilation
Three unescaped-quote typos produce malformed El string literals:
"at the tail ofsafety_soft_phrases(
\"having a breakdown\""]"vs the correct sibling line 278\"...\"]")closes the El string early, desyncing the lexer's string/code phase for the
rest of the file. Downstream, apostrophe text in comments (
can't,i'm)lands in code-phase and shatters into bare identifiers (
can; t; i; m; none; soft; hard;) → invalid C. (This is the real cause of the reported"apostrophe → broken C"; the lexer's apostrophe handling is fine.)
str_replace(topic_snip, """, "'"): the bare"""lexes as an empty string plus an unterminated string that swallows the
closing
)and}. With the current elc this leaves an unclosed call-arglist and triggers the parser overrun → ~700GB OOM.
topic_tagsliteral.All three now use escaped inner quotes (
"\"","[\"...\"]").Verification (bounded, existing elc — no compiler rebuild)
safety.el→ compiles clean, complete brace-balanced C,safety_soft_phrasesis a single well-formed literal, zero apostrophe shards.sessions.el→ compiles clean, 626 lines of C, braces 311/311, no OOM(previously OOM-killed at ~700GB).
These fixes unblock compilation immediately with the current elc binary. The
underlying compiler robustness fix (elc should emit a syntax error, not OOM, on
such input) is proposed separately in neuron-technologies/el#<hotfix/elc-fixes>.