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

Fixes #28 by preventing Buffer being invalidated by GC during a read #29

Merged
merged 1 commit into from
Jun 2, 2014

Conversation

programmarchy
Copy link
Contributor

This should prevent the Buffer allocated in EIO_AfterRead from getting invalidated by the GC, which caused a segfault when attempting to use the invalidated handle.

Related to nodejs/node-v0.x-archive#5864


argv[0] = Undefined();
argv[1] = resultBuffer;
argv[1] = scope.Close(resultBuffer);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to a windows setup to test this but does scope get defined in this function?

@eelcocramer
Copy link
Owner

Thanks for the PR. I will test this on Linux and OSX to confirm.

@eelcocramer eelcocramer merged commit 7eeb85f into eelcocramer:master Jun 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants