Repository navigation
pref: re-enable boehm GC by default for musl (fix #27090) - #27220
Merged
Merged
Conversation
Commit 6978ca9 made musl-based targets default to `-gc none` to sidestep an old Alpine segfault (#14737 from V 0.2.4). The downside, reported in #27090, is that all Alpine binaries now run without a GC and grow without bound β the repro from the issue eats 5 GB+ of RAM where `-gc boehm` finishes in 4 KB. Boehm GC works on current musl/Alpine, so revert the special case and restore the historical default. Users who specifically need `-gc none` can still pass it explicitly.
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.
Summary
|| p.is_muslclause invlib/v/pref/default.vintroduced by 6978ca9, which was disabling the GC for all Alpine/musl builds in an attempt to work around the old Segfaults when using gc on musl-based systemΒ #14737 segfault (V 0.2.4).-gc boehm.build-c.txtand the unknown--gcerror message inpref.vto their original wording.test_musl_defaults_to_no_gc/test_musl_keeps_explicit_gc_selectionwith a single regression testtest_musl_still_defaults_to_boehm_gcreferencing [Alpine] without GC by defaultΒ #27090.Boehm GC works on current musl/Alpine; anyone who specifically wants
-gc nonecan still pass it explicitly.Test plan
./v -o vfix cmd/vbuilds cleanly in the worktree.VFLAGS="-gc none" ./vfix test vlib/v/pref/pref_test.vpasses (including the new regression test)../vfix -musl examples/hello_world.vbuilds and runs.