Skip Menu |

This queue is for tickets about the JavaScript-V8 CPAN distribution.

Report information
The Basics
Id: 75861
Status: resolved
Priority: 0/
Queue: JavaScript-V8

People
Owner: Nobody in particular
Requestors: thecrux [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.06
Fixed in: 0.07



Subject: segmentation fault when context used after destroying
Test case script: ---------------------------------- #!/usr/bin/perl use strict; use warnings; use JavaScript::V8; my $context = JavaScript::V8::Context->new(); my @savecontext = (); my $inside = sub { my $context2 = JavaScript::V8::Context->new(); #push @savecontext, $context2; return $context2->eval("obj = { dieperl : function() { return {} } }"); }; $context->bind( inside => $inside ); $context->eval("x = inside(); x.dieperl()"); die $@ if ($@); ---------------------------------- $ gdb --args perl testcase Program received signal SIGSEGV, Segmentation fault. 0x00007ffff65fb16a in v8::Context::Enter() () from /usr/lib64/libv8.so.3.9.19 After execution of inside() $context2 was destroyed and execution code from that context results SIGSEGV. If context is saved into current scope (uncomment line `push @savecontext, $context2;`) than all run ok. Can't decide is it bug or feature? )
Definitely a bug. Seems fixed in current code, now your code gives: Error: Fatal error: V8 context is no more at tf line 15. at undefined:1:68 Thanks for the report!