gdb/254: strncmp check is wrong on Solaris 8

dave@arsdigita.com dave@arsdigita.com
Thu Oct 18 18:46:00 GMT 2001


>Number:         254
>Category:       gdb
>Synopsis:       strncmp check is wrong on Solaris 8
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 09 13:58:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Drazen Kacar
>Release:        gdb-5.1
>Organization:
>Environment:
Solaris 8
>Description:
Configure check in libiberty tries to find out if strncmp()
reads past the end of its string parameters. The check
involves mmap() call. However, on Solaris 8 that mmap() call
fails and then configure script determines that strncmp()
doesn't work as expected.

Solaris 8 got MAP_ANON (and MAP_ANONYMOUS) facility, but
the implementation requires that file descriptor passed to
mmap() must be -1. The current check passes a valid fd,
obtained by opening /dev/zero. So mmap() fails with EINVAL.

With MAP_ANON removed from mmap() call, the configure check
for strncmp() succeeds.
>How-To-Repeat:
Run configure test on Solaris 8.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list