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: "Segmentation fault" CygWin tools with code Injection-MS Detours



I can't really tell from your description.  It looks like the LD_PRELOAD
stuff won't be called in the forkee, but I don't know if that's what you're
seeing or not.  It still works when a process is execed, so it seems
like it should be working most of the time.  I've fixed this in CVS.

I'll generate a snapshot with this change today.


Ok, the behavior I would like to have, is the LD_PRELOAD also called by the forkee, this willl allow the forkee to load the DLL I have declared in the LD_PRELOAD environment variable & allowing me to manipulate memories & Win32 functions addresses/pointers to perform hook inside.



If yes, & if it is possible to correct this special really interresting undocumented CygWin Feature, I think, it will allow me to trace systems Win32 native call (not cygwin call like strace), in all cygwin tools.


Sorry, but no, this is a cygwin-only solution. It doesn't work with
non-cygwin DLLs.


I understand well that this is a cygwin only solution but it appears to work with non cygwin dlls as DllMain entries are standard & my code to install the hook is executed from the DllMain entry ;). It is sure, I cannot know how it impact the Cygwin Tools stability, but it works... (only in the forker ! not in the forkee ! as We saw above :( ).
I really understand this & your point of view & declining responsabilities or future behavior on this ;)


Just only having the forkee working with the LD_PRELOAD will be I suppose, not a solution for me... but a good workaround....
Louis


cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/






--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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