about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-03-02T20·09+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-03-02T20·09+0000
commit56af8e86e3e00d8417838f582221e60e1d5f5fdb (patch)
treeadf222d98495b2fdbe0f2f9a648ddac70efdce66 /src
parent3f9e647ae8c4928a8fc4de0d704119245f58ff45 (diff)
* Protect the `true', `false' and `__overrides' constants. Without
  an ATprotect call, these could be garbage collected, leading to
  weird crashes or wrong results.

Diffstat (limited to 'src')
-rwxr-xr-xsrc/aterm-helper.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/aterm-helper.pl b/src/aterm-helper.pl
index 9b2bde700017..f1eb77ee80c2 100755
--- a/src/aterm-helper.pl
+++ b/src/aterm-helper.pl
@@ -146,8 +146,9 @@ while (<STDIN>) {
         my $value = $2;
         print HEADER "extern ATerm $name;\n";
         print IMPL "ATerm $name = 0;\n";
-        $init .= "    $name = $value;\n";
-    }
+        $init .= "    $name = $value;\n"; 
+        $init .= "    ATprotect(&$name);\n";
+   }
 
     elsif (/^\s*init\s+(\w+)\s*$/) {
         $initFun = $1;