shithub: mc

Download patch

ref: 1c1fd2f09c278e2f105abeadc5d5f0d2017c655a
parent: f47233878dc144452dfca022313107c507b685b8
author: Ori Bernstein <[email protected]>
date: Thu Jan 2 09:46:41 EST 2014

Fix crash in myrtypes.

    We weren't initializing the type constraint table
    when we were dumping a usefile.

--- a/myrtypes/myrtypes.c
+++ b/myrtypes/myrtypes.c
@@ -199,6 +199,7 @@
         file = mkfile(argv[i]);
         file->file.exports = mkstab();
         file->file.globls = mkstab();
+        tyinit(file->file.globls);
         printf("%s:\n", argv[i]);
         if (fromuse) {
             f = fopen(argv[i], "r");
@@ -207,7 +208,6 @@
             loaduse(f, file->file.globls);
             dumpsyms(file->file.globls, 1);
         } else {
-            tyinit(file->file.globls);
             tokinit(argv[i]);
             yyparse();
             infer(file);