NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/47120: libc alloca(3) seems to fail



The following reply was made to PR lib/47120; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, lib-bug-people%netbsd.org@localhost, 
        gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/47120: libc alloca(3) seems to fail
Date: Wed, 24 Oct 2012 13:44:33 -0400

 On Oct 24,  4:40pm, sdaoden%gmail.com@localhost (sdaoden%gmail.com@localhost) 
wrote:
 -- Subject: lib/47120: libc alloca(3) seems to fail
 
 | >Number:         47120
 | >Category:       lib
 | >Synopsis:       libc alloca(3) seems to fail
 | >Confidential:   no
 | >Severity:       critical
 | >Priority:       high
 | >Responsible:    lib-bug-people
 | >State:          open
 | >Class:          sw-bug
 | >Submitter-Id:   net
 | >Arrival-Date:   Wed Oct 24 16:40:00 +0000 2012
 | >Originator:     Steffen
 | >Release:        6.0
 | >Organization:
 | >Environment:
 | NetBSD nbsd6 6.0 NetBSD 6.0 (GENERIC) i386
 | (running an old VirtualBox: 4.1.8, r75467)
 | >Description:
 | When compiled in a way that gcc(1) builtin alloca() is used the program 
doesn't show any error, but if the libc version is used the returned buffer is 
trashed in an otherwise unmodified environment.
 | >How-To-Repeat:
 | Download S-nail(1), branch *next* (or 
http://sourceforge.net/projects/s-nail/files/s-nail-current.tar.gz/download).
 | Sorry but i don't know any other way to reproduce this error.
 | 
 | Run "$ make DESTDIR=bad CFLAGS='-O2 -std=c89' install; make distclean; make 
DESTDIR=good CFLAGS='-O3 -std=c89' install".
 | 
 | Run "$ MAILRC=/dev/null {bad,good}/usr/local/bin/s-nail -nf" and simply "p" 
the mail of the following minimal mailbox (any mail did in tests though):
 | 
 
 Looks like a compiler bug. Only affecting i386. -O0 -O2 breaks -O3 works.
 On the other hand the code needs to be fixed to pass:
 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wextra -Wswitch 
-Wpointer-arith -Wshadow -Wcast-qual
 
 and it does not.
 
 christos
 


Home | Main Index | Thread Index | Old Index