This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Compile tst-cleanupx4 test with -fexceptions
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 30 Jun 2016 03:56:02 -0700
- Subject: Re: [PATCH] Compile tst-cleanupx4 test with -fexceptions
- Authentication-results: sourceware.org; auth=none
- References: <20160601211705 dot GA29115 at intel dot com> <20160630104243 dot GA17807 at aurel32 dot net>
On Thu, Jun 30, 2016 at 3:42 AM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On 2016-06-01 14:17, H.J. Lu wrote:
>> tst-cleanupx4 is linked with tst-cleanupx4.o and tst-cleanup4aux.o.
>> Since tst-cleanupx4.o is compiled from tst-cleanup4.c with -fexceptions,
>> tst-cleanupx4.c should also be compiled with -fexceptions.
>>
>> Tested on x86-64 and i686. OK for master?
>>
>>
>> H.J.
>> --
>> [BZ 18645]
>> * nptl/Makefile (extra-test-objs): Add tst-cleanupx4aux.o
>> (test-extras): Add tst-cleanupx4aux.
>> (CFLAGS-tst-cleanupx4aux.c): New. Set to -fexceptions.
>> ($(objpfx)tst-cleanupx4): Replace tst-cleanup4aux.o with
>> tst-cleanupx4aux.o.
>> * nptl/tst-cleanupx4aux.c: New file.
>> ---
>> nptl/Makefile | 8 +++++---
>> nptl/tst-cleanupx4aux.c | 1 +
>> 2 files changed, 6 insertions(+), 3 deletions(-)
>> create mode 100644 nptl/tst-cleanupx4aux.c
>
> I am probably a bit late, but I have been pointed in the past there that
> the point of tst-cleanupx4 is actually to test unwinding through a
> function not compliled with -fexceptions:
>
> https://sourceware.org/ml/libc-alpha/2014-07/msg00299.html
>
> Note that I have identified the GCC change which introduced this
> regression:
>
> http://www.sourceware.org/ml/libc-alpha/2015-11/msg00533.html
>
I can understand it won't be considered as a GCC bug:
'-fexceptions'
Enable exception handling. Generates extra code needed to
propagate exceptions. For some targets, this implies GCC generates
frame unwind information for all functions, which can produce
significant data size overhead, although it does not affect
execution. If you do not specify this option, GCC enables it by
default for languages like C++ that normally require exception
handling, and disables it for languages like C that do not normally
require it. However, you may need to enable this option when
compiling C code that needs to interoperate properly with exception
handlers written in C++. You may also wish to disable this option
if you are compiling older C++ programs that don't use exception
handling.
Can we make tst-cleanupx4 to pass on i686 without -fexceptions
using the current GCC?
--
H.J.