Author: bernhard
Date: Fri May 18 13:01:33 2007
New Revision: 18586

Modified:
   trunk/compilers/imcc/main.c

Log:
#42336: segfault happens with 'parrot --pre-process-only'
yylex_destroy() was called twice.
- Diese und die folgenden Zeilen werden ignoriert --

M    compilers/imcc/main.c


Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c (original)
+++ trunk/compilers/imcc/main.c Fri May 18 13:01:33 2007
@@ -379,9 +379,9 @@
 static void
 do_pre_process(Parrot_Interp interp)
 {
-    int c;
-    YYSTYPE val;
-    yyscan_t         yyscanner;
+    int       c;
+    YYSTYPE   val;
+    yyscan_t  yyscanner;
 
     yyscanner   = IMCC_INFO(interp)->yyscanner;
 
@@ -483,7 +483,8 @@
     }
     printf("\n");
     fflush(stdout);
-    yylex_destroy(&yyscanner);
+
+    return;
 }
 
 static void
@@ -636,7 +637,8 @@
         Parrot_destroy(interp);
         yylex_destroy(yyscanner);
         IMCC_INFO(interp)->yyscanner = NULL;
-        Parrot_exit(interp, 0);
+
+        return 0;
     }
 
     /* Do we need to produce an output file? If so, what type? */

Reply via email to