Re: sparse linear instruction offset for memops

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

 



On Sun, Mar 12, 2017 at 02:46:18PM +0000, Dibyendu Majumdar wrote:
> Hi
> 
> I am investigating a crash in the avltree test program I mentioned
> before. I noticed the following:
> 
> Linearised output:
> 
>  load.64     %r338 <- -16[%r333]
> 
> LLVM output:
> 
>   %10 = getelementptr inbounds i8, i8* %9, i64 4294967280
> 
> Instead of -16 we are getting a garbage offset. This appears to be
> caused by the fact that the offset field in the instruction is
> unsigned. Should the offset be a signed field instead?

It's not the problem here, I think.
The LLVM instruction is an *inbound* GEP, so there is no reasons
to use a negative offset as it would automatically be out-of-bound.

The GEP is unappropriate here, the correct code should really
subtract the offset from the pointer and then use this as the
load address.

-- Luc Van Oostenryck
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux