Fix 6 language correctness bugs found in comprehensive audit#504
Open
nbeerbower wants to merge 3 commits into
Open
Fix 6 language correctness bugs found in comprehensive audit#504nbeerbower wants to merge 3 commits into
nbeerbower wants to merge 3 commits into
Conversation
CRITICAL fixes: - Fix labeled break/continue losing target_label through try-finally blocks (statements.c: save/restore target_label alongside is_breaking/is_continuing) - Fix OR patterns in match not binding variables in both interpreter and compiler (interpreter: transfer temp_env bindings to parent env on match; compiler: pre-declare bindings before OR blocks, use assignment in alternatives) - Fix compiler defer stack not scoped per function — nested calls executed wrong defers (add hml_defer_save_depth/hml_defer_execute_to_depth to runtime, emit depth tracking at function entry, use scoped execution at return) HIGH fixes: - Fix exception value not retained when re-thrown from task join (concurrency.c: VALUE_RETAIN exception_value after copying exception_state) - Fix const parameter modifier parsed but never enforced at runtime (add param_is_const to Function struct, pass to env_define_param, environment already enforces const on set) MODERATE fix: - Fix leading-dot float literals (.5) not supporting underscore separators (lexer.c: allow underscores in fractional/exponent digits, use strip_underscores) Adds 4 parity tests covering the fixed issues. https://claude.ai/code/session_01Vm74RMmHxnBri5cPBSshkY
…ctness-checklist-ra4x2
…ctness-checklist-ra4x2 # Conflicts: # src/backends/interpreter/runtime/eval_pattern_match.c
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.
CRITICAL fixes:
(statements.c: save/restore target_label alongside is_breaking/is_continuing)
(interpreter: transfer temp_env bindings to parent env on match;
compiler: pre-declare bindings before OR blocks, use assignment in alternatives)
(add hml_defer_save_depth/hml_defer_execute_to_depth to runtime,
emit depth tracking at function entry, use scoped execution at return)
HIGH fixes:
(concurrency.c: VALUE_RETAIN exception_value after copying exception_state)
(add param_is_const to Function struct, pass to env_define_param,
environment already enforces const on set)
MODERATE fix:
(lexer.c: allow underscores in fractional/exponent digits, use strip_underscores)
Adds 4 parity tests covering the fixed issues.
https://claude.ai/code/session_01Vm74RMmHxnBri5cPBSshkY