Exception decref in unwinding can release for orphaned wait handles
commit2e3bfffafee517ca1ef9c8616b5993f646708e74
authorMichael Colavita <mcolavita@fb.com>
Tue, 23 Feb 2021 02:55:01 +0000 (22 18:55 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 26 Feb 2021 00:30:07 +0000 (25 16:30 -0800)
tree26fedc67a33a8218edd003ea805fbad1d9cddf2c
parent1d8e280bf2071aaec65f817ed7b83bebecac7b28
Exception decref in unwinding can release for orphaned wait handles

Summary: When an awaitable chain is orphaned and throws an exception, the process of unwinding the awaitable chain will result in the exception being released when it the top (orphaned) wait handle is released. Therefore, we should decReleaseCheck instead of decRefCount. This bug was causing intermittent cores in v2g and dbgo servicelabs.

Reviewed By: ricklavoie

Differential Revision: D26418570

fbshipit-source-id: 882b472d31845ea1328e8f61ec7d006ea534b414
hphp/runtime/vm/jit/unwind-itanium.cpp
hphp/test/slow/debug_backtrace/orphaned_wh.php [new file with mode: 0644]
hphp/test/slow/debug_backtrace/orphaned_wh.php.expectf [new file with mode: 0644]