Skip to content

rewrite getWorkingDirectory to use allocaBytes for exception safety #32

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

Merged
merged 1 commit into from
Dec 24, 2014

Conversation

redneb
Copy link
Contributor

@redneb redneb commented Dec 23, 2014

Currently, the implementation of getWorkingDirectory uses mallocBytes/free directly, without bracket or allocaBytes. Therefore it will leak space in the event of an (asynchronous) exception.

gregorycollins added a commit that referenced this pull request Dec 24, 2014
rewrite getWorkingDirectory to use allocaBytes for exception safety
@gregorycollins gregorycollins merged commit 275a51a into haskell:master Dec 24, 2014
@redneb redneb deleted the getcwd-exn-safe branch December 24, 2014 02:46
@redneb redneb restored the getcwd-exn-safe branch December 24, 2014 02:48
@redneb redneb deleted the getcwd-exn-safe branch December 24, 2014 02:52
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