Repository navigation
fix(codegen): compile Cowlib MIME tables without allocation failure - #94
Merged
Merged
Conversation
Build Cowlib's unchanged file-type table without raising the memory limit. Keep the expected file type for every listed extension. Check this behavior automatically on Linux.
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.
Why
Cowlib's MIME table maps file extensions to content types, but the compiler ran out of memory while building it.
Approval queues this fix for the next combined pull request; it does not merge the fix immediately.
What changed
Before and after
Before: The compiler ran out of memory under a 6,800,000 KiB memory limit.
After: The module now compiles and links within the 6,800,000 KiB memory limit; all 1,017 file-type checks pass.
This changes compiler memory use rather than a graphical view; recorded commands and program output demonstrate the result.
Checked
Live validation: Demonstrated for this version. 3 of 3 scenarios driven live in the product.
How it was checked
Built the runtime first, then ran cargo build --release --locked.
Ran cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked --no-fail-fast: 2,264 passed and one ignored.
The inherited umask 0002 exposed an existing storage-fixture failure; the complete workspace gate passes with umask 0022.
Ran nera test -j 1 --timeout 30, python3 scripts/test-allocator-config.py and python3 scripts/test-stacktrace-order.py.
Ran the pinned MIME integration regression ten times and the independent slot unit regression ten times, with negative controls for both.
Reran only the MIME scenario to retain exact commands, actual inherited object/link limits and both engine completion markers; the compiler digest remained identical.
The original compiler aborted at 5,142,956 KiB peak resident memory; the repaired object build completed at 2,345,648 KiB.
Ran the existing Cowlib example and Python harness discovery; matching OTP development headers were supplied in disposable storage.
Validated Linux x86-64 only. Full Cowlib upstream suites and native macOS/Windows execution are not established by this change.
Risk
Risk above low: Blast radius, high — Shared compiler storage assignment affects eligible functions throughout the project.; Novelty, medium — Adds conservative storage reuse beside existing compiler analysis.
Full risk assessment