[ORC] Don't try to copy from an empty segment in SimpleExecutorMemoryManager.
authorLang Hames <lhames@gmail.com>
Wed, 20 Jul 2022 22:38:34 +0000 (15:38 -0700)
committerLang Hames <lhames@gmail.com>
Wed, 20 Jul 2022 23:47:00 +0000 (16:47 -0700)
commitaabc4b13e8c9c1c17cb6ee0975f54e816fc6da8a
tree0ed1972b497aa43d260c2a88353325ce9c51834a
parentd0728260577d66b4b4d922adf0a40de86f09ccf5
[ORC] Don't try to copy from an empty segment in SimpleExecutorMemoryManager.

Since 67220c2ad72e empty SPSSequence<char>s deserialize to default-constructed
ArrayRef<char>s, which have a null data field. We need to check for this to
avoid memcpy'ing from a nullptr.

This should fix the bot failure in
https://lab.llvm.org/buildbot/#/builders/85/builds/9323
llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp