fix(runtime): crashes and hangs from choice/thread scoping bugs #170 - #173
Merged
Merged
Conversation
Problems: - Local variables leaked between choices. -> each choice opens a new temporary scope - An not closed `START_TAG` marker trapped all content before it -> `dangling tags` are closed at NEWLINE, END and thread completion !! validate if we want to throw away the tag - Choice tags were pointers to runner's tag, which were invalidated at array growth -> Choice tags reference runner's tag by index - `list_table::redifen()` assigned pointer before allocating new memory - `list_table::get_var()` hands out pointer to a resizable array, which leads to invalid pointer if too many handles are requested -> new concept `managed_instances`: a non continouse container each time it growth it allocates an additionl chunk (for non dyanmic cases it behaves the same) - Fixed `list_flag` values printing through the wrong `value::get<>()` tag (`list` instead of `list_flag`).
Ink Proof ResultsThese results are obtained by running the Ink-Proof Testing Suite on the compiled binaries in this pull request.
|
t0mg
added a commit
to t0mg/inkcpp
that referenced
this pull request
Sep 20, 2026
t0mg
added a commit
to t0mg/inkcpp
that referenced
this pull request
Sep 20, 2026
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.
Problems:
START_TAGmarker trapped all content before it ->dangling tagsare closed at NEWLINE, END and thread completion !! validate if we want to throw away the taglist_table::redifen()assigned pointer before allocating new memorylist_table::get_var()hands out pointer to a resizable array, which leads to invalid pointer if too many handles are requested -> new conceptmanaged_instances: a non continouse container each time it growth it allocates an additionl chunk (for non dyanmic cases it behaves the same)list_flagvalues printing through the wrongvalue::get<>()tag (listinstead oflist_flag).