This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin 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] | |
The attached patch fixes the problem described in the following thread:
http://cygwin.com/ml/cygwin-developers/2002-11/msg00019.html
Given the following facts:
1. During fork(), fork_copy() is run after
dll_list::load_after_fork().
2. The static dll_index variable in include/cygwin/cygwin_dll.h is
not marked NO_COPY.
3. The dll structure allocated by dll_list::alloc() is not
guaranteed to be the same in the parent and child.
I believe that the following is the correct root cause analysis of the
problem:
When #3 above occurs, fork_copy() overwrites the child's dll_index
with the parent's value. This causes dll_list::detach() to access
unallocated memory which in turn causes the child to stackdump.
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
Attachment:
cygwin_dll.h.diff
Description: Text document
Attachment:
cygwin_dll.h.ChangeLog
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |