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
594c759f37c301d0245dc2accf4d4aaf9d202819 (Optimize
arena_prof_tctx_set().).
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index 76c5b93..4c1a471 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -1105,8 +1105,8 @@
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);