coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-9.4.170-7b206 undefined behaviour in tests


From: Sam James
Subject: Re: coreutils-9.4.170-7b206 undefined behaviour in tests
Date: Sun, 24 Mar 2024 15:39:18 +0000
User-agent: mu4e 1.12.2; emacs 30.0.50

Bruno Haible <bruno@clisp.org> writes:

> Hi,
>
> Building coreutils-9.4.170-7b206 on a glibc system, with clang and ASAN and
> UBSAN options, produces 4 test failures.
>
> I'm using clang 17.0.4 with the options
> CC="$CC 
> -fsanitize=address,undefined,signed-integer-overflow,shift,integer-divide-by-zero"
> CFLAGS="-O0 -fno-omit-frame-pointer -ggdb"
> ASAN_OPTIONS="detect_leaks=0 abort_on_error=1 allocator_may_return_null=1"
>
> The failing tests are:
>
> FAIL: tests/misc/comm.pl
> FAIL: tests/join/join.pl
> FAIL: tests/uniq/uniq.pl
> FAIL: tests/ls/removed-directory.sh
>
> In the test-suite.log file there are hundreds of occurrences of
>
> + ../lib/linebuffer.c:65:22: runtime error: applying zero offset to null 
> pointer
> + SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
> ../lib/linebuffer.c:65:22 in 
>
> and 1 occurrence of
>
> +../lib/mpsort.c:155:34: runtime error: applying zero offset to null pointer
> +SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
> ../lib/mpsort.c:155:34 in 
>
> I have proposed a fix for this in
> <https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00055.html>,
> but Paul Eggert opposes it.

That's a shame. I was planning on doing an UBSAN run again over GNU
packages and it'll be a pain to have to keep adjusting for this.

>
> Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]