This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix BZ#20544 (assert function passed to atexit/on_exit/__cxa_atexit != NULL)
On 28/11/2018 15:43, Paul Pluzhnikov wrote:
> On Mon, Nov 26, 2018 at 11:02 AM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>
> Thanks for the review.
>
>> #else
>> {
>> struct support_capture_subprocess result;
>> result = support_capture_subprocess (do_test_bz20544_atexit, NULL);
>> support_capture_subprocess_check (&result, "bz20544", 128 + SIGABRT,
>> sc_allow_stderr);
>
> This doesn't work: the actual exit code on my Linux/x86_64 system is 6, not 134.
>
> I notice that in libio/tst-vtables-common.c, Florian first initialized
> expected SIGABRT termination_status in init_termination_status(), and
> then used that in support_capture_subprocess_check() calls. Do I need
> to do the same here?
>
> A different way to ask: do different OSes encode WIFSIGNALED /
> WIFEXITED differently?
Yes, this is the most portable way indeed to get the expected termination
value and I think we should use the same strategy on this tests.
However I wouldn't not expected that Linux with same arch would have
different returned values.