Bugzilla – Attachment 36 Details for
Bug 154
1C (1cv7.exe) изредка падает при печати отчета
EN
|
RU
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Вариант патча
variants_to_solve (text/plain), 2.67 KB, created by
Константин Петров
on 2010-11-18 03:58:26 MSK
(
hide
)
Description:
Вариант патча
Filename:
MIME Type:
Creator:
Константин Петров
Created:
2010-11-18 03:58:26 MSK
Size:
2.67 KB
patch
obsolete
>Hi, > >Below are the outputs from a sample program that does a call to an invalid address. The first trace is without the patch and the second is with. > >=>1 0x7fe3704c INSTR_EmulateInstruction+0xb8(rec=0x7fbbfe2c, context=0x7fbbfb60) [/home/rob/wine/dlls/kernel/instr.c:455] in kernel32 (0x7fbbfa90) > 2 0x7fe700f3 vectored_handler(ptrs=0x7fbbfacc) [/home/rob/wine/dlls/kernel/wowthunk.c:357] in kernel32 (0x7fbbfaac) > 3 0xb7e39082 __regs_RtlRaiseException+0xc2(rec=0x7fbbfe2c, context=0x7fbbfb60) [/home/rob/wine/dlls/ntdll/exception.c:196] in ntdll (0x7fbbfb30) > 4 0xb7e54b7f raise_segv_exception(rec=0x7fbbfe2c, context=0x7fbbfb60) [/home/rob/wine/dlls/ntdll/signal_i386.c:887] in ntdll (0x7fbbfb4c) > 5 0xb7e5d4d4 __wine_call_from_32_restore_regs in ntdll (0x7fbbfe9c) > 6 0x7fbde163 __wine_exe_main in winver (0x7fbbff2c) > 7 0x7fe504ff start_process(arg=0x0) [/home/rob/wine/dlls/kernel/process.c:1044] in kernel32 (0x7fbbfff4) > 8 0xb7fc0535 wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000) > 0x7fe3704c INSTR_EmulateInstruction+0xb8 [/home/rob/wine/dlls/kernel/instr.c:455] in kernel32: movb 0x0(%edi),%dl > 455 switch(*instr) > > Backtrace: > =>1 0x0000cccc (0x7fbbfe9c) > 2 0x7fbde163 __wine_exe_main+0x163 in winver (0x7fbbff2c) > 3 0x7fe504ff start_process+0xc3(arg=0x0) [/home/rob/wine/dlls/kernel/process.c:1044] in kernel32 (0x7fbbfff4) > 4 0xb7fc0535 wine_switch_to_stack+0x11 in libwine.so.1 (0x00000000) > 0x0000cccc: addb %al,0x0(%eax) > > Therefore this patch aids in debugging. It isn't perfect because of x86's variable length instructions, but it is fairly unlikely that an instruction will straddle a page boundary and the first page be readable and the second not. > > Changelog: > Make instruction emulation code more tolerant of bad addresses by checking the instruction pointer refers to readable memory. > > -- > Rob Shearman > > > > Index: dlls/kernel/instr.c > =================================================================== > RCS file: /home/wine/wine/dlls/kernel/instr.c,v > retrieving revision 1.22 > diff -u -p -r1.22 instr.c > --- dlls/kernel/instr.c 31 May 2005 13:28:42 -0000 1.22 > +++ dlls/kernel/instr.c 19 Jun 2005 03:41:17 -0000 > @@ -443,6 +443,7 @@ DWORD INSTR_EmulateInstruction( EXCEPTIO > long_op = long_addr = (!ISV86(context) && IS_SELECTOR_32BIT(context->SegCs)); > instr = make_ptr( context, context->SegCs, context->Eip, TRUE ); > if (!instr) return ExceptionContinueSearch; > + if (IsBadReadPtr(instr, 1)) return ExceptionContinueSearch; > > /* First handle any possible prefix */ > > > > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 154
:
28
|
29
|
30
|
31
|
34
|
35
| 36 |
88
|
89
|
256