mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
sapi/phpdbg: windows update exception type falling into segfault.
close GH-15098
This commit is contained in:
4
NEWS
4
NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.4.0beta1
|
||||
|
||||
- PHPDBG:
|
||||
. array out of bounds, stack overflow handled for segfault handler on windows.
|
||||
(David Carlier)
|
||||
|
||||
|
||||
01 Aug 2024, PHP 8.4.0alpha4
|
||||
|
||||
|
||||
@@ -1627,7 +1627,7 @@ phpdbg_main:
|
||||
|
||||
#ifdef _WIN32
|
||||
} __except(phpdbg_exception_handler_win32(xp = GetExceptionInformation())) {
|
||||
phpdbg_error("Access violation (Segmentation fault) encountered\ntrying to abort cleanly...");
|
||||
phpdbg_error("Segmentation fault encountered\ntrying to abort cleanly...");
|
||||
}
|
||||
#endif
|
||||
phpdbg_out:
|
||||
|
||||
@@ -28,11 +28,15 @@ int phpdbg_exception_handler_win32(EXCEPTION_POINTERS *xp) {
|
||||
EXCEPTION_RECORD *xr = xp->ExceptionRecord;
|
||||
CONTEXT *xc = xp->ContextRecord;
|
||||
|
||||
if(xr->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
|
||||
|
||||
if (phpdbg_watchpoint_segfault_handler((void *)xr->ExceptionInformation[1]) == SUCCESS) {
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
switch (xr->ExceptionCode) {
|
||||
case EXCEPTION_ACCESS_VIOLATION:
|
||||
case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
|
||||
case EXCEPTION_STACK_OVERFLOW:
|
||||
if (phpdbg_watchpoint_segfault_handler((void *)xr->ExceptionInformation[1]) == SUCCESS) {
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
break;
|
||||
EMPTY_SWITCH_DEFAULT_CASE()
|
||||
}
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
|
||||
Reference in New Issue
Block a user