I was referring to the C NULL macro which is the null pointer, and not the
NULL character.
You are correct that there are other functions that have this problem, which
is why I proposed some other way of indicating c-string-no-null. I am just
not convinced that there is no collateral damage from your patch on others
that allow for, and expect at times, a (CHAR *)0 to be passed in.
On Fri, Feb 18, 2011 at 11:06 AM, Stas Boukarev <email address hidden> wrote:
> I don't see how passing NULL where a pointer to a char is expected is
> useful, NULL is a char, but it's not a pointer to one. And it's not limited
> to getenv, you can take any function which takes a c-string and you'll get a
> memory fault.
> e.g.
> (sb-posix:getpwnam nil) => Memory fault
>
> --
> You received this bug notification because you are subscribed to SBCL.
> https://bugs.launchpad.net/bugs/721087
>
> Title:
> posix-getenv causes "Unhandled memory fault"
>
I was referring to the C NULL macro which is the null pointer, and not the
NULL character.
You are correct that there are other functions that have this problem, which
is why I proposed some other way of indicating c-string-no-null. I am just
not convinced that there is no collateral damage from your patch on others
that allow for, and expect at times, a (CHAR *)0 to be passed in.
On Fri, Feb 18, 2011 at 11:06 AM, Stas Boukarev <email address hidden> wrote:
> I don't see how passing NULL where a pointer to a char is expected is /bugs.launchpad .net/bugs/ 721087
> useful, NULL is a char, but it's not a pointer to one. And it's not limited
> to getenv, you can take any function which takes a c-string and you'll get a
> memory fault.
> e.g.
> (sb-posix:getpwnam nil) => Memory fault
>
> --
> You received this bug notification because you are subscribed to SBCL.
> https:/
>
> Title:
> posix-getenv causes "Unhandled memory fault"
>