[PATCH] D13050: [ELF2] Fix an assertion failure on 32-bit platform

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 08:41:25 PDT 2015

In Win32 build, uintptr_t is 32 bit unsigned integer. The isInt function 
64 bit signed integer as a parameter. A uint32 value converts to int64 
sign bit extension, so isInt receives a positive value, which cannot be 
as signed 32 bit integer value.

I see nothing odd here.

On 22.09.2015 21:23, Rafael EspĂ­ndola wrote:
> On 22 September 2015 at 08:36, Igor Kudrin <ikudrin.dev at gmail.com> wrote:
>> ikudrin added a comment.
>> It fails on Windows (target triple i686-pc-win32) with MSVC 14.
> I was able to reproduce this too with MSVC 13.
> There is something odd going on. The overflow of unsigned numbers has
> defined semantics. Looks like MSVC is just getting confused with the
> isInt template.
> In any case, all that you need to do to fix the test with MSVC is
> change the type of Delta. LGTM with that.
> Cheers,
> Rafael

More information about the llvm-commits mailing list