unix:unix-getpwuid with unknown uid produces segment violation
Describe the bug
On linux, running unix:unix-getpwuid
with an unknown uid produces a
segfault.
To Reproduce
Steps to reproduce the behavior:
- Choose a uid that doesn't exist
(unix:unix-getpwuid uid)
- See error:
Error in function UNIX::SIGSEGV-HANDLER: Segmentation Violation at #x1054B2EB.
[Condition of type SIMPLE-ERROR]
Expected behavior
This should just return NIL
to indicate that there's no such uid.
This is what happens on macos.
The problem appears to be that unix-getpwuid
checks for the return
value from getpwuid_r
. However, it should check if result
parameter is NULL
or not instead.
Desktop (please complete the following information):
- OS: Linux