Is there any evidence that MariaDB (not Percona Server) has this bug?
In MariaDB, freeing memory (vio_delete) happens when THD destructor is running.. At this moment, THD is not anymore in the global threads list (see unlink_thd() calling thd->unlink() before THD destructor). The "unlink" operation is protected by LOCK_thread_count. Therefore, code in server shutdown, that traverses the threads lists under protection of the same LOCK_thread_count mutex , and issues post_kill_notification, this code cannot possibly access freed memory.
In Percona Server 5.6, on the other hand, accessing freed memory is quite possible . Freeing vio memory happens under in threadpool_remove_connection in thd->release_resources(), which is newly introduced in 5.6. MariaDB does not have THD::release_resources, and the threadpool_remove_connection is the same as in 5.5, with proper LOCK_thread_count mutex protection as described above.
https://bugs.launchpad.net/bugs/1206065