develooper Front page | perl.dbi.changes | Postings from March 2013

[svn:dbi] r15591 - dbi/trunk

From:
timbo
Date:
March 28, 2013 12:30
Subject:
[svn:dbi] r15591 - dbi/trunk
Message ID:
20130328123033.1BA00184BB2@xx12.develooper.com
Author: timbo
Date: Thu Mar 28 05:30:31 2013
New Revision: 15591

Modified:
   dbi/trunk/Changes
   dbi/trunk/DBI.xs

Log:
Fixed heap-use-after-free during global destruction RT#75614

Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes	(original)
+++ dbi/trunk/Changes	Thu Mar 28 05:30:31 2013
@@ -8,6 +8,10 @@
 
 =cut
 
+=head2 Changes in DBI 1.625
+
+  Fixed heap-use-after-free during global destruction RT#75614
+
 =head2 Changes in DBI 1.624 (svn r15576) 22nd March 2013
 
   Fixed Gofer for hash randomization in perl 5.17.10+ RT#84146

Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs	(original)
+++ dbi/trunk/DBI.xs	Thu Mar 28 05:30:31 2013
@@ -3342,7 +3342,8 @@
             }
             if (ima_flags & IMA_KEEP_ERR)
                 keep_error = TRUE;
-            if (ima_flags & IMA_KEEP_ERR_SUB
+            if ((ima_flags & IMA_KEEP_ERR_SUB)
+                && !PL_dirty
                 && DBIc_PARENT_COM(imp_xxh) && DBIc_CALL_DEPTH(DBIc_PARENT_COM(imp_xxh)) > 0)
                 keep_error = TRUE;
             if (ima_flags & IMA_CLEAR_STMT) {
@@ -3449,6 +3450,7 @@
             DBIc_ACTIVE_off(imp_xxh);
         }
         call_depth = 0;
+        is_nested_call = 0;
     }
     else {
         DBI_SET_LAST_HANDLE(h);
@@ -3461,9 +3463,9 @@
             /* XXX sv_copy() if Profiling? */
             (void)hv_store((HV*)SvRV(parent), "Statement", 9, SvREFCNT_inc(tmp_sv), 0);
         }
+        is_nested_call = (!PL_dirty && (DBIc_PARENT_COM(imp_xxh) && (DBIc_CALL_DEPTH(DBIc_PARENT_COM(imp_xxh)) >= 1)) );
     }
 
-    is_nested_call = ( call_depth > 1 || (DBIc_PARENT_COM(imp_xxh) && (DBIc_CALL_DEPTH(DBIc_PARENT_COM(imp_xxh)) >= 1)) );
 
 
     /* --- dispatch --- */



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About