[PATCH] test: Fix and stabilize tst-wcsmbs-clone-overflow test
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue May 26 18:39:42 GMT 2026
On 26/05/26 14:35, Carlos O'Donell wrote:
> 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).
>
Right, I forgot that it uses the PT_INTERP. In this case, moving to a
dynamic linked test does work. And I agree that tests-static that
might call dlopen should be ran in a test-container.
More information about the Libc-alpha
mailing list