mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
pthread_join() stores the thread's return value (a "void *", i.e.
8 bytes on 64 bit computers) into the address that is passed as second
parameter. However, the entries of thread_data are only normal "int"s,
i.e. only 4 bytes. The additional 4 bytes of the return value clobber
whatever is adjacent on the stack, i.e. other members of the thread_data
array (which will be re-written in the next iteration of the for-loop,
so that nobody noticed this problem), or another other local variable
on the stack for the last iteration. Use "intptr_t" to declare the
thread_data array entries with the correct size.
Fixes:
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| check_buffer_fill.c | ||
| check_child_memory.c | ||
| check_gcr_el1_cswitch.c | ||
| check_hugetlb_options.c | ||
| check_ksm_options.c | ||
| check_mmap_options.c | ||
| check_prctl.c | ||
| check_tags_inclusion.c | ||
| check_user_mem.c | ||
| Makefile | ||
| mte_common_util.c | ||
| mte_common_util.h | ||
| mte_def.h | ||
| mte_helper.S | ||