Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternalModuleReadFile and InternalReadModuleJSON crash if directory named package.json. #18243

Closed
jdalton opened this issue Jan 18, 2018 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. module Issues and PRs related to the module subsystem.

Comments

@jdalton
Copy link
Member

jdalton commented Jan 18, 2018

touch index.js
mkdir package.json
node ./

Will cause a hard crash

node[64237]: ../src/node_file.cc:505:void node::InternalModuleReadFile(const FunctionCallbackInfo<v8::Value> &): Assertion `(numchars) >= (0)' failed.
 1: node::Abort() [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 2: node::InternalCallbackScope::~InternalCallbackScope() [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 3: node::InternalModuleReadFile(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/jdalton/.nvm/versions/node/v9.3.0/bin/node]
 7: 0x27c9edd042fd
 8: 0x27c9eddbd1e0
 9: 0x27c9eddbd1e0
@bnoordhuis bnoordhuis added duplicate Issues and PRs that are duplicates of other issues or PRs. module Issues and PRs related to the module subsystem. labels Jan 19, 2018
@bnoordhuis
Copy link
Member

Known issue, duplicate of #8307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. module Issues and PRs related to the module subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants