-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Use return value of getpwuid_r(), not errno #13969
Conversation
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.
Indeed! nice one.
I checked other reentrant ones in this file but this seems to be the only mistake indeed.
Please target this to PHP-8.2 |
@dstogov indeed, I forgot to change the target! |
@arnaud-lb It seems we still get some failures on macOS: https://github.com/php/php-src/actions/runs/8746998656/job/24004796765
|
Speaking of macos @iluuu1994 I was unable to reproduce for days the phar module segfault occurring only on intel arch, I have a arm64 version. |
@devnexen Ok, that's unfortunate. Thank you nonetheless. I will try to add ASAN to CI for macOS today, maybe that will help with identification of the issues. |
I wasn't able to reproduce this one in various configurations including in Valgrind/ASAN. Please let me know if it fails again, I will take an other look. |
@arnaud-lb Did you try a release build? That's what seems to be failing on CI (NTS). |
Yes, I actually tried both but no luck |
getpwuid_r() and other reentrant functions used in ext/posix return an error number and may not set errno. #13921 updated ext/posix to use the return value, but one change was forgotten.
#13921 also sets the buffer len to
1
by default in debug builds, which allowed to detect this issue on Mac OS.