Crash confuses me

Graham graham at sicklepod.com
Sat Mar 9 08:21:34 CST 2013


On 09/03/13 14:08, André Hentschel wrote:
> Am 09.03.2013 02:40, schrieb Graham:
>> On 08/03/13 22:40, Francois Gouget wrote:
>>> On Fri, 8 Mar 2013, Marcus Meissner wrote:
>>> [...]
>>>> "real NOVICE" and using LD_PRELOAD or "hotpatching" does not fit together for me...?
>>>>
>>>> - wine uses it own elfloader, which might cause issues.
>>> Really? I thought it used the standard elf loader hence the need for 
>>> tricks to get the native libraries to load in the right place. What it 
>>> does have however is its own PE loader. Not sure if it's relevant here.
>>>
>> the functions i detoured in kernel32.dll.so were LoadLibrary and
>> FreeLibrary, the question still remains how its even possible, this
>> should be a fairly straight-forward thing to answer for you developers,
>> i would had thought.  If its too much to understand , please say :/
> Wines loader stuff can be fairly complex as Marcus already pointed out, though the change(s) needed to fix your problem was most likely quite small and nothing we keep in mind.
> Why didn't you tried using Regression testing as Alexandre Goujon suggested?
>
>> i put code which detours LoadLibrary and FreeLibrary in kernel32.dll.so
>> , but the code only runs at a later certain time after program execution
>> ... ( trigger is actually a certain library loaded, i detect it in dlsym
>> ) ... But in wine 1.4.1 the program crashes at a time earlier than the
>> triggered detour, understand??  This don't seem physically possible, any
>> explanation?
> Maybe another thread or something was calling these functions before you do, or you called a function that calls one of them and you didn't expected that?
>
>
i have dlsym in my LD_PRELOAD, even if another thread is calling dlsym,
my logging within the implementaiton of dlsym in my LD_PRELOAD library
would notify me of such?  My code is very simple, i check for certain
library symbol within dlsym, if its one which is called last ( i
remember its name )/ at the end of the loading routine, then i will from
there initiate my detour to loadlibrarya.. within loadlibrary a, i
create a new thread with pthread_create,, only on condition of a
particular windows dll given as argument to loadlibrarya ofc.  this is
how its working, and it works under 1.5 , not 1.4.1 , i go with the
theory its something with the elf loader, cheers ...



More information about the wine-devel mailing list