On Fri, 16 May 2008, Joerg Schilling wrote:

> "Richard L. Hamilton" <[EMAIL PROTECTED]> wrote:
>
>> Shouldn't this use MAP_ANON and an fd arg of -1 rather than explicitly
>> opening /dev/zero?  One less thing to go wrong,
>> two less statements and syscalls, typically.
>
> The related lib is much older than MAP_ANON.
>
>
>
>> around that.  And I remember that SVR2 on e.g. the AT&T 3B15 allowed
>> dereferencing at least a NULL char *, but I don't remember whether that
>> bad precedent was only intended to apply to char * (and presumably,
>
> The related code was definitely broken. SVR2 sources did e.g. expect to
> see a nul character when dereferencing argv[argc].
>
> BTW: From the C-standard, dereferencing a NULL pointer could also create
> pink smoke in your screen.

Can I have the sourcecode for that signal handler, please ?

:)

On a historical note, mmap'ing MAP_ANON and fd==-1 only was introduced 
with Solaris 9 as far as I remember. Could've been Solaris 8, but anything 
older I'm sure it required the /dev/zero "trick".

By the way, the manpage ld.so.1(1) mentions [EMAIL PROTECTED] see the section 
at the 
very bottom:

        http://docs.sun.com/app/docs/doc/819-2239/ld.so.1-1

FrankH.
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to