I am playing with Worms II and the installer that comes with the Demo and uncovered a signal handling fault Under Solaris and some wierdness in the installer.
After decompressing the application the installer executes the setup program which displays a splash screen the application then generates a Page Fault Exception. I can't give a stack trace because here is where the wierdness is. The Setup Program seems to not inherit the -debugmsg status and doesn't end up under control of the debugger (By this time there are 5 wine processes running)
Anyway to cut a long story short the page fault DOES occur in a mapped region (Its in VIRTUAL_DumpViews() listing) but doesn't have a handler associated with it. This makes VirtualHandleFault fall through to the following code
BYTE vprot = view->prot[((char *)addr - (char *)view->base) >> page_shift]; void *page = (void *)((UINT_PTR)addr & ~page_mask); char *stack = (char *)NtCurrentTeb()->stack_base + SIGNAL_STACK_SIZE + page_mask + 1; if (vprot & VPROT_GUARD) { VIRTUAL_SetProt( view, page, page_mask + 1, vprot & ~VPROT_GUARD ); ret = STATUS_GUARD_PAGE_VIOLATION; } /* is it inside the stack guard pages? */ if (((char *)addr >= stack) && ((char *)addr < stack + 2*(page_mask+1))) ret = STATUS_STACK_OVERFLOW;
But of course this code doesn't reset the page protections to allow the access.
I Doctored this code so it would always allow the access and the installer then completed OK, But worms itself will not run yet
Q. Should all views have handlers ? Under What Conditions would they not ???
Robert Lunnon bob@yarrabee.net.au writes:
But of course this code doesn't reset the page protections to allow the access.
I Doctored this code so it would always allow the access and the installer then completed OK, But worms itself will not run yet
Q. Should all views have handlers ? Under What Conditions would they not ???
No, most views don't need handlers. Except in specific cases like guard pages or DIB handling, if a given page is marked as no access then we very much want to crash if it is accessed. Resetting the protections on all accesses would make page protections completely useless. You'll need to investigate where that page comes from and why it's not accessible.