[ORC] Fix serialization / deserialization of default-constructed ArrayRef<char>.
authorLang Hames <lhames@gmail.com>
Tue, 19 Jul 2022 03:36:17 +0000 (20:36 -0700)
committerLang Hames <lhames@gmail.com>
Tue, 19 Jul 2022 03:39:01 +0000 (20:39 -0700)
commit67220c2ad72e32cea18bb261366e64fe5de75b16
tree6c2d13e7c16299983da05f35df741f880c7c8744
parent58dfaaaace4ea75ab3588a6e738f2cf58ebf77c2
[ORC] Fix serialization / deserialization of default-constructed ArrayRef<char>.

Avoids a zero-length memcpy from a null src, which caused errors on some of the
sanitizer bots. Also uses null when deserializing an empty ArrayRef (rather
than pointing to a zero length range in the middle of the input buffer).
llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h
llvm/unittests/ExecutionEngine/Orc/SimplePackedSerializationTest.cpp