qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PULL 00/47] ppc-for-2.10 queue 20170424


From: Peter Maydell
Subject: Re: [Qemu-ppc] [PULL 00/47] ppc-for-2.10 queue 20170424
Date: Wed, 26 Apr 2017 11:46:16 +0100

On 26 April 2017 at 07:11, Cédric Le Goater <address@hidden> wrote:
> yes. May be we could add this flag :
>
>         --extra-cflags=-fsanitize=undefined
>
> to the travis builds using clang ? It is reporting a couple of errors on ppc64
>
> target/ppc/translate.c:980:56: runtime error: left shift of negative value 
> -32768
> target/ppc/translate.c:983:56: runtime error: left shift of negative value -16
> hw/usb/hcd-ohci.c:1122:9: runtime error: left shift of 15 by 28 places cannot 
> be represented in type 'int'
> hw/usb/hcd-ohci.c:1122:9: runtime error: left shift of 15 by 28 places cannot 
> be represented in type 'int'
> hw/usb/hcd-ohci.c:1179:12: runtime error: left shift of 15 by 28 places 
> cannot be represented in type 'int'

All the stuff about shifts is false positives, because the sanitizer
doesn't know that -fwrapv makes these operations defined behaviour.

Newer versions of clang I think get this correct, and less new
but not ancient clang has a flag that says "don't report that
particular set of shift errors". For my pullreq tests at the moment
I just use grep to filter them out:
 https://git.linaro.org/people/peter.maydell/misc-scripts.git/tree/greplogs
but as the TODO note says I should find out what the right ubsan
flag is to suppress them at source.

thanks
-- PMM



reply via email to

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