mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Fix dangerous casts in tests.
Fix dangerous casts of int variables to pointers in thread join function calls. On LP64 systems, int and pointers are different sizes, so writes can corrupt memory.
This commit is contained in:
@@ -77,12 +77,12 @@ main(void)
|
||||
je_thread_start(NULL);
|
||||
|
||||
je_thread_create(&thread, je_thread_start, NULL);
|
||||
je_thread_join(thread, (void *)&ret);
|
||||
je_thread_join(thread, NULL);
|
||||
|
||||
je_thread_start(NULL);
|
||||
|
||||
je_thread_create(&thread, je_thread_start, NULL);
|
||||
je_thread_join(thread, (void *)&ret);
|
||||
je_thread_join(thread, NULL);
|
||||
|
||||
je_thread_start(NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user