close 564772 1.12-1
tag 564772 patch lenny
thanks

On Tue, Jan 12, 2010 at 11:11:10AM +0200, Niko Tyni wrote:

> I haven't really investigated the segfault: given that there's an error
> indicator before it happens and that it's fixed in sid, I don't think
> it's worth the effort trying to fix it in lenny. YMMV of course.

Heh, turns out I couldn't resist.

Here's the smallest test case I could easily come up with that shows
errors with 'valgrind debugperl t.pl':

use JavaScript;

for (1..4) { 
    my $r = JavaScript::Runtime->new;
    my $c = $r->create_context;
    $c->eval("function a () { b(); }");
    die $@ if $@;
    $c->call("a");
    warn("$_: $@");
}
__END__

The errors are gone with upstream version 1.10; the attached patch from
 svn://svn.versed.se/public/Perl/modules/JavaScript/trunk
revision 931 seems to be the one that fixed it.

+    - Fixed a couple of problems that cause contexts no to be destroyed when 
supposed to

The Changes chunk doesn't apply to 1.08 but the rest does, and the
new package seems to work correctly and doesn't crash with the
'wpadextract' code anymore.

Therefore closing at 1.12-1, which was the first fixed version in Debian,
and tagging. 

I'm not going to prepare a Lenny update but if somebody else wants to,
be my guest.

Cheers,
-- 
Niko Tyni   nt...@debian.org
Index: lib/JavaScript/Context.pm
===================================================================
--- lib/JavaScript/Context.pm	(revision 930)
+++ lib/JavaScript/Context.pm	(revision 931)
@@ -19,10 +19,8 @@
     
     my $self = bless { _impl => $cx_ptr }, $pkg;
 
-    $Context{${$cx_ptr}} = $self;
-    
-    weaken($Context{$cx_ptr});
-
+    $Context{$$cx_ptr} = $self;
+    weaken($Context{$$cx_ptr});
     $self->{runtime} = $runtime;
     
     return $self;
Index: Changes
===================================================================
--- Changes	(revision 930)
+++ Changes	(revision 931)
@@ -4,6 +4,7 @@
     - Added a native PerlArray type that encapsulates a Perl array reference in JavaScript.
     - Changed the linked list that stores bound classes to a pair of HVs storing JavaScript::PerlClass objects instead
       which are basically just PJS_Class* references.
+    - Fixed a couple of problems that cause contexts no to be destroyed when supposed to
     
 1.09  2008-08-03
     - It's now possible to set and get the version of JS our context is dealing with since in
Index: t/30-refcount.t
===================================================================
--- t/30-refcount.t	(revision 930)
+++ t/30-refcount.t	(revision 931)
@@ -31,5 +31,5 @@
         is($sv->REFCNT, 2);
     }
     
-    is($sv->REFCNT, 1);
+    is($sv->REFCNT, 0);
 }

Property changes on: .
___________________________________________________________________
Modified: svk:merge
   - 24d78d22-682a-0410-ae7a-b087dc3d7f21:/local/JavaScript/trunk:1088
6d47c629-e757-4592-bafc-9f23fb27ea10:/local/JavaScript/trunk:2164
ac18310e-ae2c-4907-9a00-8a3c03c1a6ec:/local/JavaScript/trunk:1517
cda92c6a-fb21-0410-9766-c2fee78cb8f3:/local/JavaScript/branches/c-level-interrupt-handlers:259
cda92c6a-fb21-0410-9766-c2fee78cb8f3:/local/JavaScript/trunk:353
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/branches/pre-1.0:217
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/tags/release-0.55:68
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/trunk:851
f61cdda9-8c22-47d3-819a-b7ab18064363:/local/JavaScript/trunk:1665
   + 24d78d22-682a-0410-ae7a-b087dc3d7f21:/local/JavaScript/trunk:1088
6d47c629-e757-4592-bafc-9f23fb27ea10:/local/JavaScript/trunk:2164
ac18310e-ae2c-4907-9a00-8a3c03c1a6ec:/local/JavaScript/trunk:1517
cda92c6a-fb21-0410-9766-c2fee78cb8f3:/local/JavaScript/branches/c-level-interrupt-handlers:259
cda92c6a-fb21-0410-9766-c2fee78cb8f3:/local/JavaScript/trunk:353
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/branches/pre-1.0:217
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/tags/release-0.55:68
e8db979d-c905-0410-b24c-e05f523dc7b4:/JavaScript/trunk:851
f61cdda9-8c22-47d3-819a-b7ab18064363:/local/JavaScript/trunk:1666

Reply via email to