Commit 624a242b authored by Sam Roberts's avatar Sam Roberts Committed by Rich Trott
Browse files

test: simplify regression test for SEGV

Test was introduced in 08a5b442 as a regression test, and has evolved
since then. Simplify the test so that it doesn't rely on an undocumented
argument to tls.createSecureCredentials().

See: https://github.com/nodejs/node-v0.x-archive/issues/6690

Confirmation that this reworked test triggers the original bug:

	%) % node
	> process.version
	'v0.10.48'
	> credentials = crypto.createCredentials()
	{ context: {} }
	> context = credentials.context
	{}
	> notcontext = { setOptions: context.setOptions }
	{ setOptions: [Function: setOptions] }
	> notcontext.setOptions()
	node: ../src/node_object_wrap.h:61: static T* node::ObjectWrap::Unwrap(v8::Handle<v8::Object>) [with T = node::crypto::SecureContext]: Assertion `handle->InternalFieldCount() > 0' failed.
	zsh: abort (core dumped)  node

PR-URL: https://github.com/nodejs/node/pull/24241


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 3ffc84a4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment