[LLVMdev] [Patch] Bufer overrun in getValueTypeList()

Martinez, Javier E javier.e.martinez at intel.com
Wed Apr 28 15:46:31 PDT 2010


Hello,

The attached patch is to add an assert to getValueTypeList() to verify that for simple value types their value is NOT between MAX_ALLOWED_VALUETYPE and LastSimpleValueType (inclusive) as this causes a buffer overrun.

Thanks,
Javier

-----Original Message-----
From: Duncan Sands [mailto:baldrick at free.fr] 
Sent: Tuesday, April 27, 2010 5:07 AM
To: Martinez, Javier E
Cc: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Bufer overrun in getValueTypeList()

Hi Javier,

> I've modified my backend such that the function isn't called anymore
> with iPTR. I still think that if iPTR is an invalid input to
> getValueTypeList() that the function should have at least an assert
> checking that.

I agree - please post a patch adding one.

Ciao,

Duncan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SelectionDAG.cpp.patch
Type: application/octet-stream
Size: 511 bytes
Desc: SelectionDAG.cpp.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100428/582a8b48/attachment.obj>


More information about the llvm-dev mailing list