Subject: port-m68k/37631: m68k libc broken
To: None <,,>
From: None <>
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
System: NetBSD  4.99.45 (MAC-BETH) #15: Thu Dec 27 12:41:04 CET 2007
Architecture: mac68k
Machine: m68k

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 :-(


Install -current libc and watch everything fail ;-)