-
Notifications
You must be signed in to change notification settings - Fork 112
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
Errno fix #463
Errno fix #463
Conversation
Previously this test would emit an error message but not abort if the errno was not as expected on failure. This was because the return in the null == true case prevented the check for failed == true at the end of check_result from being reached. To resolve this just abort immediately instead of instead of setting failed to true, as in the null case. See microsoft#461.
cfbb55a
to
f88e521
Compare
After a bit of tinkering and some more thought I am withdrawing this PR because I think this is not the correct solution: snmalloc should not be setting |
This was not being done for certain cases as per microsoft#461. Note that malloc and calloc are probably still not setting errno for those cases but this is not currently tested...
I don't want a branch on the fast path of |
In that case setting |
Does In particular, I read Which implies we can set it. |
POSIX2018 is pretty liberal WRT
|
To get this right, some of the other pals should probably set it. Like snmalloc/src/pal/pal_windows.h Lines 163 to 196 in af8ab2d
Windows Pal should probably set |
I think this version avoids extra overhead on the fast path except in the case of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing
Here is a fix for #461 and the associated test. I've done separate commits for the test and the bug fix. Not sure if you would prefer them to be squashed?