Use return value of getpwuid_r(), not errno#13969
Conversation
ndossche
left a comment
There was a problem hiding this comment.
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
1by default in debug builds, which allowed to detect this issue on Mac OS.