gdb seems to be not always able to fetch the correct context for thread locals. Thus, the "if (TSRMLS_CACHE)" clause causes gdb to show crashes which aren't recognized neither with helgrind nor in release builds. This is reproducable by setting breakpoints on the exact line where PHP has a tsrm_get_ls_cache() call.
Depending on circumstances, usage of xmlCleanupParser can affect the thread local storage, or even cause crashes in single threaded programs. On shutdown the memory will be freed anyway, however not using xmlCleanupParser helps to avoid possible shutdown crashes.