GNU libc segfaults when using POSIX.1b timers in Red Hat Enterprise Linux

Solution Verified - Updated -

Issue

While trying out a Posix test suite, a program encounters a segmentation fault when calling timer_gettime with a bogus timer id value. It is expected to result in EINVAL but instead it segfaults. Here is a code snippet to illustrate the issue:

#define BOGUSTID 9999tid = (timer_t);timer_gettime(tid, &its);

Following is the backtrace in gdb:

#0  0x000000341ae04c46 in timer_gettime@@GLIBC_2.3.3 () from /lib64/librt.so.1
#1  0x00000000004005ec in main ()

Environment

Red Hat Enterprise Linux for i386 and x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.