Author: petdance
Date: Sat Feb 23 19:03:30 2008
New Revision: 26035

Modified:
   trunk/compilers/imcc/imcc.l
   trunk/compilers/imcc/imclexer.c

Log:
isolating, ever closer, RT #50920

Modified: trunk/compilers/imcc/imcc.l
==============================================================================
--- trunk/compilers/imcc/imcc.l (original)
+++ trunk/compilers/imcc/imcc.l Sat Feb 23 19:03:30 2008
@@ -889,6 +889,11 @@
 
     params->num_param = 0;
 
+    /* See http://rt.perl.org/rt3/Ticket/Display.html?id=50920 for the saga of 
this bug. */
+    /* For some reason, we have to use a dupe of the macro name to pass in to 
*/
+    /* read_params, or we get a segfault. XXX Make it stop. */
+    macro_name = str_dup(macro_name);
+
     while (c != ')') {
         if (YYSTATE == heredoc2)
             IMCC_fataly(interp, E_SyntaxError,
@@ -1130,10 +1135,7 @@
         start_cond = YY_START;
         BEGIN(macro);
 
-        /* See http://rt.perl.org/rt3/Ticket/Display.html?id=50920 for the 
saga of this bug. */
-        /* For some reason, we have to use a dupe of the macro name to pass in 
to */
-        /* read_params, or we get a segfault. XXX Make it stop. */
-        read_params(NULL, interp, &frame->expansion, str_dup(name), 0, 
yyscanner);
+        read_params(NULL, interp, &frame->expansion, name, 0, yyscanner);
 
         BEGIN(start_cond);
 

Modified: trunk/compilers/imcc/imclexer.c
==============================================================================
--- trunk/compilers/imcc/imclexer.c     (original)
+++ trunk/compilers/imcc/imclexer.c     Sat Feb 23 19:03:30 2008
@@ -5515,6 +5515,11 @@
 
     params->num_param = 0;
 
+    /* See http://rt.perl.org/rt3/Ticket/Display.html?id=50920 for the saga of 
this bug. */
+    /* For some reason, we have to use a dupe of the macro name to pass in to 
*/
+    /* read_params, or we get a segfault. XXX Make it stop. */
+    macro_name = str_dup(macro_name);
+
     while (c != ')') {
         if (YYSTATE == heredoc2)
             IMCC_fataly(interp, E_SyntaxError,
@@ -5756,10 +5761,7 @@
         start_cond = YY_START;
         BEGIN(macro);
 
-        /* See http://rt.perl.org/rt3/Ticket/Display.html?id=50920 for the 
saga of this bug. */
-        /* For some reason, we have to use a dupe of the macro name to pass in 
to */
-        /* read_params, or we get a segfault. XXX Make it stop. */
-        read_params(NULL, interp, &frame->expansion, str_dup(name), 0, 
yyscanner);
+        read_params(NULL, interp, &frame->expansion, name, 0, yyscanner);
 
         BEGIN(start_cond);
 

Reply via email to