GNU bug report logs - #25024
build: adjust for ASAN/UBSAN

Previous Next

Package: coreutils;

Reported by: Marcel Böhme <boehme.marcel <at> gmail.com>

Date: Fri, 25 Nov 2016 06:19:02 UTC

Severity: wishlist

Full log


Message #8 received at 25024 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Marcel Böhme <boehme.marcel <at> gmail.com>,
 25024 <at> debbugs.gnu.org
Subject: Re: bug#25024: Bug in Sort
Date: Fri, 25 Nov 2016 13:06:47 +0000
On 25/11/16 06:18, Marcel Böhme wrote:
> Dear all,
> 
> The following execution is flagged by UBSAN as undefined behaviour:
> 
> $ echo 0 > a; printf "%0.s0" {1..58} >> a
> $ ./sort -R a
> 
> UBSAN says:
> ../lib/md5.c:371:7: runtime error: load of misaligned address 0x7ffdfd45a10d for type 'const uint32_t', which requires 4 byte alignment 
> 
> So, the root cause might actually be in GNULIB. The bug was found with AFLFast, a fork of AFL.

There is some support at least for catering
for architectures where unaligned access is significant.
So for UBSAN we should probably build with
_STRING_ARCH_unaligned defined globally
to avoid warning for the cases we already handle.

cheers,
Pádraig




This bug report was last modified 6 years and 236 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.