[PATCH] test: Fix and stabilize tst-wcsmbs-clone-overflow test
Carlos O'Donell
carlos@redhat.com
Tue May 26 17:35:34 GMT 2026
On 5/26/26 8:54 AM, Adhemerval Zanella Netto wrote:
>
>
> On 26/05/26 08:45, Frédéric Bérat wrote:
>> The test tst-wcsmbs-clone-overflow was initially added to tests-static.
>> However, this causes the test to be unstable because gconv modules
>> dynamically load libc.so. Any discrepancy between the statically linked
>> version and the dynamically loaded one can lead to a crash.
>
> It is not clear when this would happen, is it the case that the tests
> is loading the system gconv modules instead of the one in the build
> directory?
No.
The wide character FILE* needs a gconv converter to convert the incoming
multi-byte character string, and so it needs to call dlopen, but for all
static binaries this requires loading the system libc.so.6.
DJ's suggestion is that we wrap all tests-static execution with a container
in order to make sure they never load the system libraries. That would
certainly be a good belt-and-suspenders for testing. However, it would
limit testing in situations where user-namespace containers are disabled
(like more hardened build systems).
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list