Subject: kern/34639: uvm_mmap returns ENOMEM when it's built with gcc4 and -Os
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <juan@xtrarom.org>
List: netbsd-bugs
Date: 09/27/2006 12:15:00
>Number:         34639
>Category:       kern
>Synopsis:       uvm_mmap returns ENOMEM when it's built with gcc4 and -Os
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 27 12:15:00 +0000 2006
>Originator:     Juan RP
>Release:        NetBSD 4.99.3
>Organization:
>Environment:
System: NetBSD nocturno 4.99.3 NetBSD 4.99.3 (Nocturno-ACPI) #107: Wed Sep 27 13:02:19 CEST 2006 juan@nocturno:/home/juan/build/obj/sys/arch/i386/compile/Nocturno-ACPI i386
Architecture: i386
Machine: i386
>Description:
	For the past days I've been trying to know why drvctl -p
	didn't work on my system, and I added a printf into
	src/common/lib/proplib/prop_kern.c::prop_dictionary_copyout_ioctl:

prop_dictionary_copyout_ioctl: error=12

	The code calls uvm_mmap() and it returns 12 (ENOMEM).
	Same code works when the kernel is not built with -Os.

>How-To-Repeat:
>Fix:
	Yes, please.