Document static musl build notes
ober
cf4bb4abe81dcaa58a4eaf1f78da20f28360bd6f
--- a/data/cookbooks.sexp +++ b/data/cookbooks.sexp @@ -4580,4 +4580,16 @@ "Cargo.toml" "standalone") ("title" . - "Use jerbuild's bundled native Rust crate from .jerbuild"))) + "Use jerbuild's bundled native Rust crate from .jerbuild")) + (("code" + . + ";; In the generated C main for a fully static Chez/Jerboa binary:\n;; - Register every FFI symbol needed at visit/load time with Sforeign_symbol.\n;; - Let Chez treat both #f and \"\" load-shared-object requests as the main executable.\n\nSforeign_symbol(\"mkstemp\", (void*)mkstemp);\nSforeign_symbol(\"mkdtemp\", (void*)mkdtemp);\nSforeign_symbol(\"unlink\", (void*)unlink);\nSforeign_symbol(\"rmdir\", (void*)rmdir);\n\nvoid *dlopen(const char *f, int flags) {\n (void)flags;\n return (!f || f[0] == '\\0') ? (void*)1 : NULL;\n}\nvoid *dlsym(void *h, const char *s) { (void)h; (void)s; return NULL; }\nint dlclose(void *h) { (void)h; return 0; }\nchar *dlerror(void) { return \"static binary: dlopen of named libraries is stubbed\"; }") ("id" . "static-musl-dlopen-main-executable-stub") + ("imports") + ("notes" + . + "Chez/Jerboa code may use both (load-shared-object #f) and (load-shared-object \"\") to expose symbols from the main executable. A static musl stub that only accepts NULL fails at runtime with \"static binary: dlopen of named libraries is stubbed\". Also register visit-time libc symbols used by loaded stdlib modules, such as std/os/temp's mkstemp, mkdtemp, unlink, and rmdir; otherwise foreign-procedure fails later with \"no entry for ...\".") + ("tags" "static" "musl" "ffi" "dlopen" "load-shared-object" + "Sforeign_symbol") + ("title" + . + "Static musl binaries need dlopen stubs for main executable lookups"))) --- a/data/features.sexp +++ b/data/features.sexp @@ -961,4 +961,25 @@ ("use_case" . "Security reviewing Jerboa source without spending most of the time triaging scanner noise.") + ("votes" . 0)) + (("closed_reason" . "") + ("description" + . + "jerboa_verify can fail internally while formatting or scanning very large Scheme files, e.g. with an Exception in string-ref on a provider module, even when the project build can compile the file. The verifier should stream or bound snippets safely and report a tool error separately from source diagnostics.") + ("estimated_token_reduction" + . + "~800 tokens per large-file verification failure") + ("example_scenario" + . + "After fixing a parenthesis imbalance in a large provider.ss file, jerboa_verify failed with an internal string-ref exception instead of returning syntax/compile diagnostics; the only practical verification was the full linux-amd64 build.") + ("id" . "verify-large-files-without-string-index-crash") + ("impact" . "medium") ("implemented_in" . "") + ("implemented_tool" . "") ("status" . "open") + ("tags" "verify" "large-files" "diagnostics" "tool-error") + ("title" + . + "Make jerboa_verify handle large source files without string index crashes") + ("use_case" + . + "Validating large Jerboa modules after a small edit without falling back to a full make build.") ("votes" . 0)))