mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-30 00:58:02 +03:00
Fix pointer comparision with undefined behavior.
This didn't cause bad code generation in the one case spot-checked (gcc
4.8.1), but had the potential to to so. This bug was introduced by
594c759f37 (Optimize
arena_prof_tctx_set().).
This commit is contained in:
parent
594c759f37
commit
b4330b02a8
1 changed files with 2 additions and 2 deletions
|
|
@ -1105,8 +1105,8 @@ arena_prof_tctx_set(const void *ptr, size_t usize, prof_tctx_t *tctx)
|
|||
|
||||
assert(arena_mapbits_allocated_get(chunk, pageind) != 0);
|
||||
|
||||
if (unlikely(usize > SMALL_MAXCLASS || tctx >
|
||||
(prof_tctx_t *)(uintptr_t)1U)) {
|
||||
if (unlikely(usize > SMALL_MAXCLASS || (uintptr_t)tctx >
|
||||
(uintptr_t)1U)) {
|
||||
arena_chunk_map_misc_t *elm;
|
||||
|
||||
assert(arena_mapbits_large_get(chunk, pageind) != 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue