diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index e6d5b330..1965cad9 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -3728,6 +3728,25 @@ def process(filename): ''' self.do_run(src, 'good\nbad') + def test_indirectbr_many(self): + if Settings.USE_TYPED_ARRAYS != 2: return self.skip('blockaddr > 255 requires ta2') + + blocks = range(1500) + init = ', '.join(['&&B%d' % b for b in blocks]) + defs = '\n'.join(['B%d: printf("%d\\n"); return 0;' % (b,b) for b in blocks]) + src = ''' + #include <stdio.h> + int main(int argc, char **argv) { + printf("\\n"); + const void *addrs[] = { %s }; + goto *addrs[argc*argc + 1000]; + +%s + return 0; + } + ''' % (init, defs) + self.do_run(src, '\n1001\n') + def test_pack(self): src = ''' #include <stdio.h> |