diff options
author | Dave Airlie <[email protected]> | 2020-06-15 10:16:06 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2020-06-16 09:48:01 +1000 |
commit | 25a629558ca1265c1d8423e3c8203795738358b5 (patch) | |
tree | 201eb9856b5f9a5218f09144f843b1ba71261395 /src/gallium/auxiliary | |
parent | 8b6820c92d213087c3ed050fdd0e8bd5847a90e6 (diff) |
gallivm/cache: don't require a null terminator for cache data.
Fixes crashes seen with
./bin/egl_ext_device_base
since cache support was added.
Fixes: 4962d3e10733 ("gallivm: add cache interface to mcjit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3118
Tested-by: Michel Dänzer <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5467>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 6f63ab50ded..9b75676a4e2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -313,7 +313,7 @@ public: virtual std::unique_ptr<llvm::MemoryBuffer> getObject(const llvm::Module *M) { if (cache_out->data_size) { - return llvm::MemoryBuffer::getMemBuffer(llvm::StringRef((const char *)cache_out->data, cache_out->data_size)); + return llvm::MemoryBuffer::getMemBuffer(llvm::StringRef((const char *)cache_out->data, cache_out->data_size), "", false); } return NULL; } |