Subject: | eval math operations cause seg faults |
I was just testing a fresh SpiderMonkey install and tried the following
script:
<code>
use JavaScript::SpiderMonkey;
my $js = JavaScript::SpiderMonkey->new();
$js->init();
$js->property_by_path("sm.output");
$js->eval(q|sm.output = 6 + 2;|);
print "result: " . $js->property_get('sm.output') . "\n";
$js->destroy();
</code>
But running this causes the error message "Segmentation fault"
If I change the eval line to read
$js->eval(q|sm.output = '6' + '2';|);
then the output is "result: 62"
I've tested this with SpiderMonkey 1.8.0-rc1 and 1.7.0