Go patch committed: Don't crash on large composite literal index

Ian Lance Taylor iant@google.com
Thu Mar 3 06:41:00 GMT 2011


This patch to the Go frontend avoids crashing if the index in an array
or slice composite literal is very large.  Part of this patch tests for
an invalid value.  Part tests for a value which is too large for the
representation used in the frontend, which is to simply build an array
holding all the values.  The latter could be fixed at some time if there
is a real use for this case.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 1603 bytes
Desc: patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110303/3086569b/attachment.bin>


More information about the Gcc-patches mailing list