Comment 3 for bug 1603806

Revision history for this message
Kieran Grant (kieran-grant) wrote :

Are you getting a single 0?
I checked 1.2.4 sources, it hasn't changed the getresuid and getresgid code.
The C functions getresuid and getresgid return 0 on success, -1 on error.
This means that sbcl-1.2.4.debian-linux-x64 version didn't notice it's stack being trashed.
This is because sb-posix needs to pass pointers to 3 ints that the C function (really, the Kernel) sets, but if the address are invalid, you get an error.
Because it was declared "never-fails" SBCL always returns an integer result.
(In this case, either 0 for success or -1 for invalid address).
On recent SBCL's, it would notice it's stack being nuked.