[PATCH v7 4/5] Fix assert during static startup

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Mar 2 12:06:29 GMT 2026



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.   */


More information about the Libc-alpha mailing list