[ORC] Shut down dispatcher in ExecutorProcessControl implementations.
authorLang Hames <lhames@gmail.com>
Tue, 12 Oct 2021 20:24:54 +0000 (13:24 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 12 Oct 2021 20:40:15 +0000 (13:40 -0700)
commit2815ed57e3c99ab6c42399c3d0cf57cc118eb5df
tree78e5279855acbb5106a111dbe73e9ad38dc14a9c
parent9939e562f73ca58369c4f15a95f06ba7ae8215c6
[ORC] Shut down dispatcher in ExecutorProcessControl implementations.

f3411616896 added a task dispatcher for async handlers, but didn't add a
TaskDispatcher::shutdown call to SelfExecutorProcessControl or SimpleRemoteEPC.
This patch adds the missing call, which ensures that we don't destroy the
dispatcher while tasks are still running.

This should fix the use-after-free crash seen in
https://lab.llvm.org/buildbot/#/builders/5/builds/13063
llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp