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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content