Re: Susprising behavior of gcc on x86 (-m32)

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

 



On Tue, Sep 8, 2015 at 12:36 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 8 September 2015 at 11:20, Mathieu Malaterre wrote:
>>
>> [...]
>> /home/mathieu/tmp/opj-bug/openjpeg/src/lib/openjp2/t1.c:1517:28:
>> runtime error: left shift of negative value -128
>> [...]
>>
>> You've saved me hours of time ! Thanks.
>>
>> for reference:
>> https://github.com/uclouvain/openjpeg/blob/master/src/lib/openjp2/t1.c#L1517
>
> UBsan for the win!

that sad news is that replacing:

tiledp[tileIndex] <<= T1_NMSEDEC_FRACBITS;

with

tiledp[tileIndex] *= (1 << T1_NMSEDEC_FRACBITS);

does clear out the runtime warning, but the bug is still there :(



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux