https://github.com/halide/Halide
Revision c2a0db12e464ad6d63a997642776b9b2b7e8a449 authored by Steven Johnson on 10 March 2021, 23:39:27 UTC, committed by GitHub on 10 March 2021, 23:39:27 UTC
Conversion from a pointer to an integer is "implementation defined"; in general, conversion to `uintptr_t` is reliable, but other conversions aren't. It turns out that for our arm32 compiler, casting a pointer to a `uint64_t` sign-extends, rather than zero-extends, causing unexpected behavior in memoize cache eviction *if* the pointer is in the top half of memory. The fix here is simple (cast to `uintptr_t` directly), but it brings up the question of where else in our codebase we might be doing direct conversions elsewhere in our code without noticing the potential UB.
1 parent 7a8c771
History
Tip revision: c2a0db12e464ad6d63a997642776b9b2b7e8a449 authored by Steven Johnson on 10 March 2021, 23:39:27 UTC
Fix correctness_memoize on arm32 (#5799)
Tip revision: c2a0db1
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 265 bytes
.clang-tidy -rw-r--r-- 1.7 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 1.1 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 4.2 KB
CMakePresets.json -rw-r--r-- 2.4 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 3.2 KB
Makefile -rw-r--r-- 99.9 KB
README.md -rw-r--r-- 14.8 KB
README_cmake.md -rw-r--r-- 69.0 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 7.5 KB
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.1 KB

README.md

back to top