Repository navigation
Description
- Electron version: 1.8.2-beta.3
- Operating system: Windows 10
Expected behavior
Electron does not crash. And run crypto successfully.
Actual behavior
Electron crashes when use crypto module in renderer process. Output stacktrace:
[26544:1206/184200.743:FATAL:partition_alloc.cc(934)] Check failed: page->num_allocated_slots != -1.
Backtrace:
GetHandleVerifier [0x00007FF712AAD9D5+25013]
GetHandleVerifier [0x00007FF712B1FE73+493139]
(No symbol) [0x00007FF712AA4EA4]
IsSandboxedProcess [0x00007FF715A8EDDD+46693001]
IsSandboxedProcess [0x00007FF714A1159B+29401671]
v8::internal::OptimizingCompileDispatcher::Unblock [0x00007FFEDFC1C847+1831]
v8::internal::OptimizingCompileDispatcher::Unblock [0x00007FFEDFC1CA68+2376]
v8::internal::GCIdleTimeHandler::ResetNoProgressCounter [0x00007FFEDF8CB30E+5566]
v8::internal::ScavengeJob::NotifyIdleTask [0x00007FFEDF8C7112+1938]
v8::internal::GCTracer::AddScopeSample [0x00007FFEDF8B90D0+13872]
v8::internal::ScopeInfo::Empty [0x00007FFEDF91BFC1+13761]
v8::internal::Factory::NewRawOneByteString [0x00007FFEDF928925+117]
v8::internal::IdentityMapBase::NextIndex [0x00007FFEDFBA5ED0+2960]
v8::internal::IdentityMapBase::NextIndex [0x00007FFEDFBA5E7B+2875]
v8::internal::HandleScope::NumberOfHandles [0x00007FFEDF84EC4A+2458]
v8::internal::HandleScope::NumberOfHandles [0x00007FFEDF854199+24297]
v8::internal::HandleScope::NumberOfHandles [0x00007FFEDF8507AC+9468]
v8::internal::Factory::TryNewFixedArray [0x00007FFEDF92DE21+3825]
(No symbol) [0x000000D638DD3DFF]
How to reproduce
// load crypto module in renderer process
const crypto = require('crypto');
const data = 'lG9E+/g4JmRmedDAnihtBD4Dfaha/GFOjd+xUOQI05UtfVX3DjUXvrS98p7kZQwY3LNhdiFo7MY5rGft8yBuDhKuNNag9vRx/44IuClDhdQ=';
const key = 'q90K9yBqhWZnAMCMTOJfPQ==';
let iv = Buffer.from('0'.repeat(32), 'hex'),
input = Buffer.from(data, 'base64'),
key = Buffer.from(key, 'base64'),
decipher = crypto.createDecipheriv('aes-128-cbc', key, iv),
ciphertext = Buffer.concat([decipher.update(input), decipher.final()]); // this line crashes electron
Activity
welcome commentedon Dec 6, 2017
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
alexeykuzmin commentedon Dec 7, 2017
For future reference:
https://chromium.googlesource.com/chromium/src.git/+/59.0.3071.115/base/allocator/partition_allocator/partition_alloc.cc#934
shingo-nakamura commentedon Dec 18, 2017
Node.js: 8.8.1
Electron: v1.8.1 beta
OS: Both Windows 10 and OSX Sierra 10.12.6
My Electron app crashed.
I can reproduce this issue like this
Electron을 v1.7.x로 다운그레이드
zcbenz commentedon Dec 26, 2017
I'm merging this to #11457.