Re: unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Bruno Haible
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

Re: unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > + int alarm_value = 50; >signal (SIGALRM, SIG_DFL); > - alarm (10); > + alarm (alarm_value); Nice trick, but doesn't the compiler optimize away this? Maybe a 'volatile' is needed. /Simon signature.asc Description: PGP signature

unistr/u8-strstr tests: Avoid test failure with ASAN

2024-05-09 Thread Bruno Haible
for QEMU-emulated environments, and using the gdb-overridable idiom from https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=a8d9f4635238f845bb76269a54fbb2c55255d365 . 2024-05-09 Bruno Haible unistr/u8-strstr tests: Avoid test failure with ASAN. * tests/unistr/test