Tom Hughes a écrit :
> In message <[EMAIL PROTECTED]>
>         Tom Hughes <[EMAIL PROTECTED]> wrote:
>
>   
>> I have recently been working on trying to get valgrind and wine to
>> work together and have run into a rather nasty problem.
>>     
>
> Unprelinking libwine has temporarily got me past the other problem, and
> sorting out the trapno issue in signal handlers that the patch on the
> wine wiki addresses then gets me to this failure:
>
> --13050-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - 
> exiting
> --13050-- si_code=2;  Faulting address: 0xBEEF0007;  sp: 0x469CC4C
>
> valgrind: the 'impossible' happened:
>    Killed by fatal signal
> ==13050==    at 0x380293B3: vgPlain_get_StackTrace2 (m_stacktrace.c:153)
> ==13050==    by 0x380294DB: vgPlain_get_StackTrace (m_stacktrace.c:437)
> ==13050==    by 0x380164E2: vgPlain_record_ExeContext (m_execontext.c:300)
> ==13050==    by 0x380025AE: create_MC_Chunk (mc_malloc_wrappers.c:141)
> ==13050==    by 0x38002C17: vgMemCheck_new_block (mc_malloc_wrappers.c:211)
> ==13050==    by 0x3800305C: vgMemCheck_malloc (mc_malloc_wrappers.c:226)
> ==13050==    by 0x38034E47: do_client_request (scheduler.c:1277)
> ==13050==    by 0x38036387: vgPlain_scheduler (scheduler.c:987)
> ==13050==    by 0x38049C28: run_a_thread_NORETURN (syswrap-linux.c:89)
>
> Now the fault address is obviously a little "suspicious" to say the
> least... Should we not be a bit more careful when doing frame pointer
> based unwinds on x86 though and just give up if we get a segv?
>
> Tom
>
>   
that's why there's another patch on the Wine wiki to ask valgrind to 
explicit check the stack frames against the stacks that a given program 
dares to give (which valgrind doesn't do at the moment)
this is likely the same kind of behavior that J Reiser tries to fix in 
his fixes for UML support under valgrind
IIRC, in WIne's case, this is needed for two reasons :
1/ the stack unwind (in generic cases) cannot be terminated properly 
(likely Wine misses a watchdog at stack's top)
2/ but also nasty 16/32 bits stack switches for some emulations
even if 1/ could be worked around in wine, 2/ is anyway a showstopper

I'd really like to see better stack unwinding protection in valgrind

A+

-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate 
the ingenuity of a complete idiot." (Douglas Adams)



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to