Mesa (master): gallivm/cache: don't require a null terminator for cache data.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 16 00:06:26 UTC 2020
Module: Mesa
Branch: master
Commit: 25a629558ca1265c1d8423e3c8203795738358b5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=25a629558ca1265c1d8423e3c8203795738358b5
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Jun 15 10:16:06 2020 +1000
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 <mdaenzer at redhat.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5467>
---
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
More information about the mesa-commit
mailing list