Skip to content

Commit b701fa8

Browse files
committed
Update news
2 parents 5ead5c5 + ea02682 commit b701fa8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

NEWS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ PHP NEWS
55
- Core:
66
. Fixed zend_call_stack build with Linux/uclibc-ng without thread support.
77
(Fabrice Fontaine)
8-
9-
- Core:
108
. Fixed bug GH-13772 (Invalid execute_data->opline pointers in observer fcall
119
handlers when JIT is enabled). (Bob)
1210

11+
- Fibers:
12+
. Fixed bug GH-13903 (ASAN false positive underflow when executing copy()).
13+
(nielsdos)
14+
1315
- FPM:
1416
. Fixed bug GH-13563 (Setting bool values via env in FPM config fails).
1517
(Jakub Zelenka)

Zend/zend_fibers.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#endif
6363

6464
#ifdef __SANITIZE_ADDRESS__
65+
# include <sanitizer/asan_interface.h>
6566
# include <sanitizer/common_interface_defs.h>
6667
#endif
6768

@@ -300,6 +301,12 @@ static void zend_fiber_stack_free(zend_fiber_stack *stack)
300301

301302
void *pointer = (void *) ((uintptr_t) stack->pointer - ZEND_FIBER_GUARD_PAGES * page_size);
302303

304+
#ifdef __SANITIZE_ADDRESS__
305+
/* If another mmap happens after unmapping, it may trigger the stale stack red zones
306+
* so we have to unpoison it before unmapping. */
307+
ASAN_UNPOISON_MEMORY_REGION(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size);
308+
#endif
309+
303310
#ifdef ZEND_WIN32
304311
VirtualFree(pointer, 0, MEM_RELEASE);
305312
#else

0 commit comments

Comments
 (0)