diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-11 14:41:53 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-11 14:41:53 -0800 |
commit | 6cb55485e579d541ddc2b84db92bc1e9a79343b2 (patch) | |
tree | 6972d977524dff7b943bd919bd3fdbfbbd9b256c /tests/runner.py | |
parent | a8d7c91a6b6228b2d2c9a00d1c0fbfc4671d5511 (diff) |
fix test_safe_heap
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/runner.py b/tests/runner.py index 349a4e73..71296f97 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7313,8 +7313,8 @@ def process(filename): src = ''' #include<stdio.h> - int main() { - int *x = new int; + #include<stdlib.h> + int main() { int *x = (int*)malloc(sizeof(int)); *x = 20; float *y = (float*)x; printf("%f\\n", *y); @@ -7359,8 +7359,8 @@ def process(filename): module = ''' #include<stdio.h> - void callFunc() { - int *x = new int; + #include<stdlib.h> + void callFunc() { int *x = (int*)malloc(sizeof(int)); *x = 20; float *y = (float*)x; printf("%f\\n", *y); @@ -7371,10 +7371,10 @@ def process(filename): main = ''' #include<stdio.h> + #include<stdlib.h> extern void callFunc(); - int main() { - callFunc(); - int *x = new int; + int main() { callFunc(); + int *x = (int*)malloc(sizeof(int)); *x = 20; float *y = (float*)x; printf("%f\\n", *y); |