Skip to content

Fix asan.test_fs_trackingdelegate by fixing open() call #15021

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
Sep 10, 2021
Merged

Conversation

kripken
Copy link
Member

@kripken kripken commented Sep 10, 2021

It turns out that when O_CREAT is given to open(), one must
also provide the flags with which to create the file. Not providing
that varargs param is apparently undefined behavior, and the
musl open() method will end up reading a vararg that does not
exist, which leads to a null deref.

@kripken kripken requested review from sbc100 and ethanalee September 10, 2021 18:24
Copy link
Collaborator

@ethanalee ethanalee left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@kripken kripken merged commit e8f25f8 into main Sep 10, 2021
@kripken kripken deleted the asancreat branch September 10, 2021 19:23
CDLlo pushed a commit to CDLlo/emscripten that referenced this pull request Oct 4, 2021
…ore#15021)

It turns out that when O_CREAT is given to open(), one must
also provide the flags with which to create the file. Not providing
that varargs param is apparently undefined behavior, and the
musl open() method will end up reading a vararg that does not
exist, which leads to a null deref.
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