commit | a6035ecd416fc9e09098f5474df3a864d0e168c3 | [log] [tgz] |
---|---|---|
author | Christopher Ferris <cferris@google.com> | Thu Jul 15 12:58:07 2021 -0700 |
committer | Christopher Ferris <cferris@google.com> | Thu Jul 15 12:58:07 2021 -0700 |
tree | 6badcd5a33ceebd727ae55f9ae4dfd09f35e948b | |
parent | 2e4be55966d0eb6d71260aa65b445141821644de [diff] |
Avoid undefined compiler behavior This is a follow-on to commit 5358cc40ab4288ed00c223f00cf898b7dc1a9484. I forgot that there were two places the undefined behavior could occur. Make the literal unsigned in the other place. Test: TreeHugger Bug: 189541929 Change-Id: Iaef81507ca61e802d277246bf5995157c93d86ce
diff --git a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp index 9d33189..b20cef7 100644 --- a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp +++ b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp
@@ -463,7 +463,7 @@ exit(1000); } free(ptr); - thread_mask.fetch_or(1 << i); + thread_mask.fetch_or(1U << i); } }); malloc_thread.detach();