diff options
author | Christopher Ferris <cferris@google.com> | 2021-07-15 12:58:07 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2021-07-15 12:58:07 -0700 |
commit | a6035ecd416fc9e09098f5474df3a864d0e168c3 (patch) | |
tree | 6badcd5a33ceebd727ae55f9ae4dfd09f35e948b | |
parent | 2e4be55966d0eb6d71260aa65b445141821644de (diff) | |
download | bionic-a6035ecd416fc9e09098f5474df3a864d0e168c3.tar.gz |
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
-rw-r--r-- | libc/malloc_debug/tests/malloc_debug_system_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp index 9d33189e9..b20cef77b 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 @@ TEST(MallocTests, DISABLED_exit_while_threads_allocating) { exit(1000); } free(ptr); - thread_mask.fetch_or(1 << i); + thread_mask.fetch_or(1U << i); } }); malloc_thread.detach(); |