This is the mail archive of the cygwin 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]

RE: LD_PRELOAD regression on 1.5.19-4 ? no more loaded library in child process

I can't help you, but I can see that there's a lot of information missing
You're right.

> What did you actually *do* to get from one step to the next in the
> above?  Where does your MSVC-linked DLL come into it?  What loads that
> DLL?  What is your system like (the information requested in
First, my DLL is written & built in C by using MS DevStudio 2003. so no by using gcc & CygWin libs
Next, I declared it through the LD_PRELOAD, which force cygwin processes (trougth the crt cygwin library) to load it in their memory space
That's really simple to reproduce, only create an empty dll with DllMain & a MessageBox showing environment variables in the Attach process step of Dll Main, & you will see that :
-The first cygwin process (bash for example) you request load it correctly & environment variable are all in the process
-Next from bash, start VI for example,
-A new instance (the forky instance) of bash will be started also with the LD_PRELOAD dll loaded correctly & also with all environment variables (If I remember, the cygwin fork() method uses the CreateProcess with longjmg, ect... & pipes for synchronizing initialization throught the parent & the forky).
-vim.exe is started through the forky instance of bash (If I am right), the LD_PRELOAD dll is still (& always) loaded correctly but only 3 or 4 environment variables have been propaged  (by using GetEnvironmentString win32  APIs as my DLL due to many constraints is compiled by using devenv & not cygwin/gcc as i said above).
The problem has been reproducible on my computers, all using a clean install of CygWin 1.5.19-4 with & without last snapshot, & the behavior is exctly reprodicble on Win2000 Server & Win2003 Enterprise server. Downgrading to 1.5.18-x resolve this issue :(

>I saw (but did not verify) one report that 1.5.19 doesn't keep the
>windows copy of the environment in some situations where 1.5.18 did,
>so manually using CreateProcess or the like may work differently.
>AFAICT, this falls in the category of "implementation detail" that you
>shouldn't be counting on.

Thx a lot for having taken & spend your time for answering me, because I wrote this mail from my home, I will try to retrieve more information about my issue later, like cygcheck for example or strace if it returns me useful information,

Unsubscribe info:
Problem reports:

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