Skip to content

Commit 11b71e8

Browse files
committed
Fixed bug #35612 (iis6 Access Violation crash)
1 parent c502abd commit 11b71e8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ PHP NEWS
44
- Fixed an error in mysqli_fetch_fields (returned NULL instead of an
55
array when row number > field_count). (Georg)
66
- Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus)
7+
- Fixed bug #35612 (iis6 Access Violation crash). (Dmitry, alacn.uhahaa)
78
- FIxed bug #35536 (mysql_field_type() doesn't handle NEWDECIMAL). (Tony)
89
- Fixed bug #35437 (Segfault or Invalid Opcode 137/1/4). (Dmitry)
910
- Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of

Zend/zend_execute_API.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ ZEND_API zend_fcall_info_cache empty_fcall_info_cache = { 0, NULL, NULL, NULL };
4545
static WNDCLASS wc;
4646
static HWND timeout_window;
4747
static HANDLE timeout_thread_event;
48+
static HANDLE timeout_thread_handle;
4849
static DWORD timeout_thread_id;
4950
static int timeout_thread_initialized=0;
5051
#endif
@@ -1253,7 +1254,7 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
12531254
void zend_init_timeout_thread()
12541255
{
12551256
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
1256-
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
1257+
timeout_thread_handle = _beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
12571258
WaitForSingleObject(timeout_thread_event, INFINITE);
12581259
}
12591260

@@ -1264,6 +1265,10 @@ void zend_shutdown_timeout_thread()
12641265
return;
12651266
}
12661267
PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0);
1268+
1269+
/* Wait for thread termination */
1270+
WaitForSingleObject(timeout_thread_handle, 5000);
1271+
CloseHandle(timeout_thread_handle);
12671272
}
12681273

12691274
#endif

0 commit comments

Comments
 (0)