Subject: port-m68k/37631: m68k libc broken
To: None <port-m68k-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <martin@duskware.de>
List: netbsd-bugs
Date: 12/28/2007 02:10:00
>Number:         37631
>Category:       port-m68k
>Synopsis:       m68k libc broken
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-m68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 28 02:10:00 +0000 2007
>Originator:     Martin Husemann
>Release:        NetBSD 4.99.45
>Organization:
>Environment:
System: NetBSD  4.99.45 (MAC-BETH) #15: Thu Dec 27 12:41:04 CET 2007  martin@night-porter.duskware.de:/usr/src/sys/arch/mac68k/compile/MAC-BETH
Architecture: mac68k
Machine: m68k
>Description:

Current libc does not return the correct return value from mmap() - in one
example I tried ktrace says:

    12      1 ls       CALL  mmap(0,0x10be,1,1,3,0,0,0)
    12      1 ls       RET   mmap 67485696/0x405c000, 4286/0x10be

but the return value from the mmap call is 0xffffa530 (an address on the
userland stack in this case). Now imagine what happens if the application
munmaps the returned address :-(

>How-To-Repeat:

Install -current libc and watch everything fail ;-)

>Fix:
n/a