This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4887] Wordexp() should be thread safe.


------- Additional Comments From t-nishiie at soft dot fujitsu dot com  2007-08-06 01:56 -------
Created an attachment (id=1947)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1947&action=view)
Test Program 2

Wordexp() is not thread safe. Because, wordexp() uses 
__setenv() and __unsetenv() internally.

# grep -n setenv ./posix/wordexp.c
857:  __unsetenv ("IFS");
1869:	  __setenv (env, value, 1);

Therefore, if a lot of wordexp() is executed at the same
 time at the same time, SIGSEGV can be generated. 
Example:tst-worexp2.tar.gz

Can you say that wordexp() is thread safe why ?


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=4887

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]