Segmentation fault running an encrypt on Node.js
dkulchenko opened this issue · comments
Here's the script I'm trying out:
var triplesec = require('triplesec');
triplesec.encrypt({
key: new triplesec.Buffer('secretkey'),
data: new triplesec.Buffer('secretthings'),
}, function(err, buff) {
if(! err) {
console.log(buff.toString('hex'));
}
});
And here's what I see:
daniilk:~ ∞ node triplesec-test.js
Segmentation fault: 11
daniilk:~ ∞
It successfully loads triplesec but segfaults during the encrypt step. Here's what gdb returns during the segfault:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
0x00000001001df446 in v8::internal::HInstruction::InsertAfter ()
(gdb) bt
#0 0x00000001001df446 in v8::internal::HInstruction::InsertAfter ()
#1 0x00000001002293c0 in v8::internal::BoundsCheckBbData::CoverCheck ()
#2 0x00000001001f86e4 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#3 0x00000001001f8854 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#4 0x00000001001f8854 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#5 0x00000001001f8854 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#6 0x00000001001f8854 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#7 0x00000001001f7e55 in v8::internal::HGraph::EliminateRedundantBoundsChecks ()
#8 0x00000001001f7d48 in v8::internal::HGraph::Optimize ()
#9 0x000000010015d24a in v8::internal::OptimizingCompiler::OptimizeGraph ()
#10 0x000000010015fa16 in v8::internal::GenerateCode ()
#11 0x000000010015e694 in v8::internal::Compiler::CompileLazy ()
#12 0x00000001002a5322 in v8::internal::JSFunction::CompileOptimized ()
#13 0x0000000100317d23 in v8::internal::Runtime_LazyRecompile ()
Running node v0.10.31, triplesec 3.0.19, on OSX 10.10.
Works fine on the latest dev version of node (v0.11.13), so seems to be a node.js/V8 bug, not a triplesec bug.
Exactly. Thanks for the feedback
On Sep 11, 2014 5:31 PM, "Daniil Kulchenko" notifications@github.com
wrote:
Works fine on the latest dev version of node (v0.11.13), so seems to be a
node.js/V8 bug, not a triplesec bug.—
Reply to this email directly or view it on GitHub
#38 (comment).