ntdll: exception.c: pretend signal handler parameters have no holes (resend)

Dan Kegel dank at kegel.com
Mon Jun 23 00:23:37 CDT 2008


The operating system invokes signal handlers with
pointers to two structs (siginfo_t and ucontext_t).
For some reason (perhaps because these structs
are very fluffy, and have large holes in them),
valgrind objects when we send these structs to wineserver.
So mark those structs fully defined to make Valgrind happy.
Should have no overhead unless you're compiling with
the valgrind headers.

You still have to run with  --workaround-gcc296-bugs=yes
or you'll see warnings about the stack when an
exception is thrown.  (That could probably be fixed, too,
but this is good enough for now.)

Fixes warnings like
 Syscall param writev(vector[...]) points to uninitialised byte(s)
   at  (within /lib/ld-2.7.so)
   by  send_request (server.c:246)
   by  wine_server_call (server.c:327)
   by  send_debug_event (exception.c:200)
   by  raise_exception (exception.c:357)
   by  __regs_RtlRaiseException (exception.c:388)
   by  raise_segv_exception (signal_i386.c:1190)
   by  ???
   by  func_image (image.c:472)
   by  run_test (test.h:421)
   by  main (test.h:470)
 Address 0x7f21fd34 is on thread 1's stack
 Uninitialised value was created by a client request
   at  setup_exception_record (signal_i386.c:1081)
   by  segv_handler (signal_i386.c:1312)
   by  (within /lib/tls/i686/cmov/libpthread-2.7.so)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ntdll-exception.patch
Type: text/x-diff
Size: 1541 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080622/3ee62d09/attachment-0001.patch 


More information about the wine-patches mailing list