Hi Duncan, 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. Thanks, Javier Hi Javier,> I've observed in some tests that getValueTypeList() is sometimes called> with type MVT::iPTR.I think this is a bug, and you would do best to open a bugreport with a testcase. Ciao, Duncan. _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100426/1e133740/attachment.html>
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.
Martinez, Javier E
2010-Apr-28 22:46 UTC
[LLVMdev] [Patch] Bufer overrun in getValueTypeList()
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>