[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unistr/u8-strstr tests: Avoid test failure with ASAN
From: |
Bruno Haible |
Subject: |
Re: unistr/u8-strstr tests: Avoid test failure with ASAN |
Date: |
Thu, 09 May 2024 16:55:15 +0200 |
Simon Josefsson wrote:
> > + int alarm_value = 50;
> > signal (SIGALRM, SIG_DFL);
> > - alarm (10);
> > + alarm (alarm_value);
>
> Nice trick, but doesn't the compiler optimize away this?
When I'm compiling for debugging, I use CFLAGS="-ggdb", that is,
implicitly -O0. (Debugging at -O2 is so much of a pain, better
do a "make distclean" and reconfigure with CFLAGS="-ggdb".)
Bruno