In break_thread(), generate_debug_event() seems to send the entire ExceptionInformation array regardless of how many entries are used. The smart thing to do would be to send only the used elements, but I couldn't figure out how to do that. So here's a quick fix that just zeroes that array before calling generate_debug_event(). Is there a better way?
Found by running the Word Viewer 97 under valgrind: 000d: wait_debug_event() = 0 { pid=000a, tid=000b, wait=(nil), event={exception,{code=80000003,flags=0,rec=(nil),addr=0x40007f0,params={},first=1} } Syscall param writev(vector[1]) points to uninitialised byte(s) at 0x40007F2: (within /lib/ld-2.5.so) by 0x806AF20: call_req_handler (request.c:249) by 0x8056075: main_loop (fd.c:523) Address 0x451AAB8 is 24 bytes inside a block of size 88 alloc'd by 0x806A167: set_reply_data_size (request.c:200) by 0x80510A6: req_wait_debug_event (request.h:96) by 0x806AFC7: call_req_handler (request.c:286) by 0x8056075: main_loop (fd.c:523)
BTW, here's how I ran word viewer under valgrind:
wordview.sh:
WINEDIR=$HOME/wine-git; VALGRIND_CMD="/usr/local/valgrind-3.2.3-wine/bin/valgrind --trace-children=yes --gen-suppressions=all --suppressions=$WINEDIR/tools/valgrind-suppressions --leak-check=full --num-callers=20 " WINE=$WINEDIR/wine wget http://downloads.pcworld.com/pub/new/business/word_processing/wordview.exe cp wordview.exe ~/.wine/drive_c/wvinstall.exe mv ~/.wine/dosdevices/z: ~/.wine/dosdevices/oldz cd ~/.wine/drive_c $VALGRIND_CMD $WINE wvinstall.exe /q cd ../.. mv ~/.wine/dosdevices/oldz ~/.wine/dosdevices/z:
On Nov 14, 2007 10:01 PM, Dan Kegel dank@kegel.com wrote:
In break_thread(), generate_debug_event() seems to send the entire ExceptionInformation array regardless of how many entries are used. The smart thing to do would be to send only the used elements, but I couldn't figure out how to do that. So here's a quick fix that just zeroes that array before calling generate_debug_event(). Is there a better way?
[This time with patch.]
(There's a similar problem on the client side, but there I think I see how to fix it right in send_debug_event().)