fix: scope IsSystemLib's noisy-dlopen libs to runtime rediscovery only - #130
Merged
Conversation
The isSystemLib unification (c5c06a7) merged install-time ldd filtering and runtime dlopen-rediscovery filtering into one regex, using the union of both lists. That silently changed install-time behavior: libselinux, libsystemd, libpam, libaudit, libdbus, libudev, libmount, libblkid, libuuid, and the glib/gobject/gio stack were previously only skipped for noisy runtime dlopen rediscovery, never for static ldd-based enumeration. After the merge, a binary directly linking any of them (an ordinary ldd dependency) got those functions silently dropped from install-time enumeration too — confirmed losing 1124 functions (libselinux.so.1 + libsystemd.so.0 entirely) on a real coverage run. Split back into two: IsSystemLib (glibc/ld.so-family only, used by install-time ParseLddLibraries) and IsNoisyDlopenLib (IsSystemLib's set plus the bulky/common dlopen targets, used by runtime handleDynamicLoad). Keeps the one part of the unification that was a genuine improvement (libresolv/libnsl/libutil/libcrypt/libanl now consistently skipped everywhere) without the regression.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
==========================================
+ Coverage 43.73% 43.84% +0.11%
==========================================
Files 11 11
Lines 1525 1528 +3
==========================================
+ Hits 667 670 +3
Misses 762 762
Partials 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
isSystemLibunification (c5c06a7) merged install-timelddfiltering and runtime dlopen-rediscovery filtering into one regex (the union of both lists). That silently changed install-time behavior: libselinux, libsystemd, libpam, libaudit, libdbus, libudev, libmount, libblkid, libuuid, and the glib/gobject/gio stack were previously only skipped for noisy runtime dlopen rediscovery, never for staticldd-based enumeration.ldddependency) got those functions silently dropped from install-time enumeration too — confirmed losing 1124 functions (libselinux.so.1+libsystemd.so.0entirely) on a real coverage run.funkutil.IsSystemLibback into two:IsSystemLib(glibc/ld.so-family only, used by install-timeParseLddLibraries) andIsNoisyDlopenLib(IsSystemLib's set plus the bulky/common dlopen targets, used by runtimehandleDynamicLoad). Keeps the one genuine improvement from the original unification (libresolv/libnsl/libutil/libcrypt/libanl now consistently skipped everywhere) without the regression.Test plan
go build ./...andgo vet ./...pass./run_unit_tests.shpasses, including newTestIsNoisyDlopenLiband extendedTestIsSystemLibcases covering libselinux/libsystemd/libpam (the original "unified" test never covered these — how the regression shipped unnoticed)libselinux.so.1/libsystemd.so.0are back in the report, and total enumerated function count reconciles exactly against a known-good baseline (40507 − 132 legitimate ctor/dtor-dedup fix = 40375, matching precisely)