[llvm-commits] [PATCH] Fixing faulty memsets

Aaron Ballman aaron at aaronballman.com
Sat Mar 10 20:10:59 PST 2012


When optimizing memset transformations, we were crashing on invalid
lengths (PR 12202).  This patch attempts to fix this so that we don't
attempt to optimize away the memset.  This ensures we don't run into
problems further down the line with APInt getting insanely large bit
widths (which would cause crashes when attempting to allocate memory
large enough to accommodate the int).

I think another patch for APInt to sanity check BitWidth might make
sense as well.  I'm open to suggestions on it though.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FaultyMemset.patch
Type: application/octet-stream
Size: 2420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120310/f7e48e1e/attachment.obj>


More information about the llvm-commits mailing list