On Tue, Jan 25, 2005 at 02:00:35PM +1100, [EMAIL PROTECTED] wrote:

> I have isolated a case where perl is happy but D::C segfaults

The following patch should fix the problem:

=== Cover.xs
==================================================================
--- Cover.xs  (revision 60)
+++ Cover.xs  (revision 61)
@@ -783,8 +783,11 @@
              * store more than one return op because a non collecting
              * sub may call back to a collecting sub.
              */
-            hv_fetch(Return_ops, get_key(PL_op->op_next), CH_SZ, 1);
-            NDEB(D(L, "adding return op %p\n", PL_op->op_next));
+            if (PL_op->op_next)
+            {
+                hv_fetch(Return_ops, get_key(PL_op->op_next), CH_SZ, 1);
+                NDEB(D(L, "adding return op %p\n", PL_op->op_next));
+            }
         }

         if (!collecting_here)

I've checked that in to my development copy along with a test case based
on your failing example (I removed the rand part).  If things are OK for
you I'll release a new version with this fix soon.

Thanks for the minimal test case.  Bug fixes are so much easier with a
concise way to reproduce the problem.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to