[PATCH v7 4/5] Fix assert during static startup
Florian Weimer
fweimer@redhat.com
Mon Mar 2 12:11:33 GMT 2026
* Adhemerval Zanella Netto:
> On 02/03/26 06:36, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>> +void __tunables_init (char **env)
>>> +{
>>> + /* The test aims to mimic how assert works during process startup, and thus
>>> + calling assert will issue __libc_assert (_(...)) which in turn may call
>>> + __dcgettext. */
>>> + __libc_assert_fail ("error", __FILE__, __LINE__, __func__);
>>> +}
>>
>> I think “thus” is very confusing here. I thought the issue is that we
>> can't call assert here because it calls __dcgettext, and this wouldn't
>> match how assert is implemented during startup?
>
> Right, maybe?
>
> /* The test aims to mimic how assert works during process startup, and
> calling assert issues __libc_assert (_(...)) which in turn call
> __dcgettext. */
Doesn't really convey that we're not ussing assert because we don't want
__dcgettext.
Thanks,
Florian
More information about the Libc-alpha
mailing list