Re: [PATCH v11 3/5] Fix assert during static startup (BZ 33326)
Florian Weimer <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <[email protected]> |
* Adhemerval Zanella:
> +/* The __tunables_init is called just before self-relocation and TLS setup,
> + so overriding it is a way to reach the assert code at that point. */
> +void
> +__tunables_init (char **env, char **argv)
> +{
> + /* Inside libc, assert() is redirected to __libc_assert_fail. This test is
> + not built as part of libc, so a plain assert() here would call the public
> + __assert_fail instead, which uses __progname and the translation routines
> + and thus is not what the startup code issues. Call the internal routine
> + directly. */
> + __libc_assert_fail ("error", __FILE__, __LINE__, __func__);
> +}
New comment looks good to me.
Reviewed-by: Florian Weimer <[email protected]>
Thanks,
Florian