This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13068] Use O_CLOEXEC for /etc/ld.so.cache and .so libraries
- From: "rosslagerwall at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 05 Sep 2011 14:29:53 +0000
- Subject: [Bug libc/13068] Use O_CLOEXEC for /etc/ld.so.cache and .so libraries
- Auto-submitted: auto-generated
- References: <bug-13068-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13068
--- Comment #1 from Ross Lagerwall <rosslagerwall at gmail dot com> 2011-09-05 14:29:53 UTC ---
Created attachment 5919
--> http://sourceware.org/bugzilla/attachment.cgi?id=5919
test program
Here is a test program which on my system (timing dependent) reproduces the
bug.
gcc -Wall -O2 -o test3 test3.c -lpthread
It will print out "close(3) = 0" if an open file descriptor leaked through to a
child process. Otherwise it will print "close(3) = -1".
The problem comes about because gethostbyname() dynamically loads libraries
without opening them O_CLOEXEC.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.