Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Segfault in runInContext #558

Closed
lm1 opened this issue Jan 10, 2011 · 4 comments
Closed

Segfault in runInContext #558

lm1 opened this issue Jan 10, 2011 · 4 comments

Comments

@lm1
Copy link

lm1 commented Jan 10, 2011

The following code generates segmentation fault:

require('vm').runInContext('', {});

possibly runInContext should check if given object is valid context.

bnoordhuis added a commit to bnoordhuis/node that referenced this issue Jul 5, 2011
@bnoordhuis
Copy link
Member

@ry 06c9a4e, review please!

@ry
Copy link

ry commented Jul 5, 2011

@bnoordhuis, LGTM

@ghost
Copy link

ghost commented Jul 5, 2011

By the way, something like this can happen at other places, too (Script.prototype.runInThisContext.call({}, ...) should end badly, too; I think all other WrappedObjects (or ObjectWraps? that superclass that is used in all similar cases) wrapping external objects should do this check...).

@bnoordhuis
Copy link
Member

@Herby Those calls should be safe (though they won't do what you expect) but if you find any that crash node, please post a test case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants