Skip to content

MSan is missing a timer_create() interceptor #111847

@tavianator

Description

@tavianator
tavianator@tachyon $ cat timer.c
#include <time.h>

int main(void) {
        timer_t timer;
        timer_create(CLOCK_REALTIME, NULL, &timer);
        return timer_delete(timer);
}
tavianator@tachyon $ clang -fsanitize=memory timer.c -o timer
tavianator@tachyon $ ./timer
==883407==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x561cbefc2079 in main (/home/tavianator/code/bfs/timer+0xcb079) (BuildId: 971f9f583274de34803afa4f8cf794755b49963f)
    #1 0x7ff3cb1f9e07 in __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #2 0x7ff3cb1f9ecb in __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:360:3
    #3 0x561cbef290e4 in _start (/home/tavianator/code/bfs/timer+0x320e4) (BuildId: 971f9f583274de34803afa4f8cf794755b49963f)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/home/tavianator/code/bfs/timer+0xcb079) (BuildId: 971f9f583274de34803afa4f8cf794755b49963f) in main
Exiting

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions