Stop pointer parameters leaking value-pool slots #43

Merged
andrew merged 4 commits from 36 into main 2026-08-06 12:38:29 -04:00
Collaborator

Fixes #36

Pointer parameters now create their call variable without generic storage, then keep the one-slot reference inline. By-value structure parameters retain pool-backed copies because the parameter may escape through POINT.

Tests: cmake --build build --parallel 2; ctest --test-dir build --output-on-failure (112/112 passed).

Fixes #36 Pointer parameters now create their call variable without generic storage, then keep the one-slot reference inline. By-value structure parameters retain pool-backed copies because the parameter may escape through POINT. Tests: cmake --build build --parallel 2; ctest --test-dir build --output-on-failure (112/112 passed).
logikoma added 1 commit 2026-08-04 23:10:31 -04:00
Stop pointer parameters leaking value-pool slots
All checks were successful
akbasic CI Build / cmake_build (push) Successful in 3m54s
akbasic CI Build / coverage (push) Successful in 4m10s
akbasic CI Build / sanitizers (push) Successful in 5m16s
akbasic CI Build / akgl_build (push) Successful in 9m43s
akbasic CI Build / mutation_test (push) Successful in 24m33s
2e60e26b2f
Create structure parameters before allocating their representation, then keep pointer references in the call variable's inline slot. Add an 8,000-call regression and document the remaining by-value structure escape limitation.

Co-authored-by: andrew <andrew@aklabs.net>
Co-authored-by: OpenAI Codex (GPT-5) <noreply@openai.com>
logikoma requested review from andrew 2026-08-04 23:10:35 -04:00
Owner

@logikoma none of your new functions in src/runtime.c have doxygen blocks explaining them, please fix

@logikoma none of your new functions in src/runtime.c have doxygen blocks explaining them, please fix
andrew reviewed 2026-08-05 09:11:53 -04:00
@@ -346,3 +349,4 @@
SUCCEED_RETURN(errctx);
}
akerr_ErrorContext *akbasic_environment_create(akbasic_Environment *obj, const char *varname, akbasic_Variable **dest)
Owner

@logikoma None of these new functions in src/environment.c have doxygen blocks, fix it

@logikoma None of these new functions in src/environment.c have doxygen blocks, fix it
Owner

@tachikoma none of the new function definitions here have doxygen blocks can you fix it

@tachikoma none of the new function definitions here have doxygen blocks can you fix it
Owner

@tachikoma none of the new function definitions here have doxygen blocks can you fix it

@tachikoma none of the new function definitions here have doxygen blocks can you fix it
tachikoma added 1 commit 2026-08-05 11:49:54 -04:00
Add doxygen block for environment_create_named
Some checks failed
akbasic CI Build / sanitizers (push) Failing after 33s
akbasic CI Build / cmake_build (push) Failing after 39s
akbasic CI Build / coverage (push) Failing after 37s
akbasic CI Build / akgl_build (push) Failing after 17s
akbasic CI Build / mutation_test (push) Failing after 17s
d29b1ace8f
Andrew flagged the new helper introduced for the value-pool-leak fix
as missing documentation. akbasic_environment_create() and
akbasic_environment_create_empty() are already documented in the
header; the shared static helper they both call was the only
undocumented new function definition.

Co-authored-by: andrew <andrew@aklabs.net>
Collaborator

Added a doxygen block for environment_create_named (the only new function definition in src/environment.c that wasn't already documented — akbasic_environment_create() and akbasic_environment_create_empty() are documented in the header). Pushed as d29b1ac.

Added a doxygen block for environment_create_named (the only new function definition in src/environment.c that wasn't already documented — akbasic_environment_create() and akbasic_environment_create_empty() are documented in the header). Pushed as d29b1ac.
andrew force-pushed 36 from d29b1ace8f to ec4a2c23d7 2026-08-05 11:52:34 -04:00 Compare
Owner

@logikoma the pipeline is failing

@logikoma the pipeline is failing
logikoma was assigned by andrew 2026-08-05 15:07:32 -04:00
logikoma added 1 commit 2026-08-05 17:05:31 -04:00
Document environment variable creation helpers
Some checks failed
akbasic CI Build / cmake_build (push) Has been cancelled
akbasic CI Build / sanitizers (push) Has been cancelled
akbasic CI Build / coverage (push) Has been cancelled
akbasic CI Build / akgl_build (push) Has been cancelled
akbasic CI Build / mutation_test (push) Has been cancelled
ebec1f1621
Author
Collaborator

Added Doxygen blocks for the new environment variable creation helper and both public wrappers. Build and all 112 tests pass.

Added Doxygen blocks for the new environment variable creation helper and both public wrappers. Build and all 112 tests pass.
Owner

@logikoma SIGN ALL COMMITS ON THIS PULL REQUEST

@logikoma SIGN ALL COMMITS ON THIS PULL REQUEST
logikoma force-pushed 36 from ebec1f1621 to 5c04edc5fb 2026-08-06 12:34:10 -04:00 Compare
Author
Collaborator

Rebuilt all three commits with Logikoma SSH signatures and force-pushed branch 36. Each commit verifies locally as G; the resulting tree is byte-for-byte unchanged. The requested Doxygen block remains in the second commit.

Rebuilt all three commits with Logikoma SSH signatures and force-pushed branch 36. Each commit verifies locally as G; the resulting tree is byte-for-byte unchanged. The requested Doxygen block remains in the second commit.
andrew added 1 commit 2026-08-06 12:38:12 -04:00
Merge branch 'main' into 36
Some checks are pending
akbasic CI Build / mutation_test (push) Waiting to run
akbasic CI Build / cmake_build (push) Successful in 3m25s
akbasic CI Build / coverage (push) Successful in 4m18s
akbasic CI Build / sanitizers (push) Successful in 5m4s
akbasic CI Build / akgl_build (push) Successful in 8m17s
39a0c60bf3
andrew merged commit bb3060b29d into main 2026-08-06 12:38:29 -04:00
Sign in to join this conversation.