Add some checks on the number of variables per type
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 1 May 2014 14:47:41 +0000 (15:47 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 6 Jun 2014 11:36:13 +0000 (12:36 +0100)
commit988914384acdf30eab22226d79de3541e7e6f02d
tree15e4aa1a7d235fc269951e537d8c7cf2ccec9bc5
parent909f41fb49ddb7d8745a3fd6565bf2eb6531e3e6
Add some checks on the number of variables per type

We want to ensure no more than, say, 8 constants are added
to a program. Adding more will violate pervasive assumptions
in the code, and may lead to various buffer overflows. By
trapping these add creation time, we prevent these issues
without cluttering the code with range checks. The user is
assumed non malicious here.

Add a test to check we can add up to and including the limit
for a type, but no more.
orc/orccompiler.c
orc/orclimits.h
orc/orcprogram.c
orc/orcprogram.h
testsuite/Makefile.am
testsuite/test-limits.c [new file with mode: 0644]