You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
phpdbg_watch_element back-pointers to phpdbg_watchpoint_t went stale
when the watchpoint was freed, defeating the GH-13681 NULL guards.
phpdbg_destroy_watchpoints also iterated its hashes in MSHUTDOWN, after
zend_mm_shutdown freed their emalloc backings: non-ASAN tolerated the
read, ZTS ASAN aborted. NULL the back-pointer in
phpdbg_clean_watch_element, tolerate NULL in phpdbg_backup_watch_element,
unregister the freed element from watch_recreation in
phpdbg_free_watch_element, and move the recreation drain and the
btree plus hash reset into RSHUTDOWN so the work runs while emalloc
memory is alive. Drop the late notices from the existing watch_*,
gh15210_*, and bug73927 expected outputs since they were artifacts of
reading freed memory.
FixesGH-13230
/* upon fatal errors etc. (i.e. CG(unclean_shutdown) == 1), some watchpoints may still be active. Ensure memory is not watched anymore for next run. Do not care about memory freeing here, shutdown is unclean and near anyway. */
zend_hash_destroy(&PHPDBG_G(watch_elements));PHPDBG_G(watch_elements).nNumOfElements=0; /* phpdbg_watch_efree() is checking against this arrays size */
0 commit comments