This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: NULL pointer check in timer_* functions




Ulrich Drepper wrote:

Khem Raj wrote:
\> I tracked it down to a problem inside timer_* functions. Currently we do


not check for timerid for NULL value inside timer_delete()
timer_settime() and timer_gettime() timer_getoverrun() functions.
This patch adds the checks to these functions.



That's all bullshit. A zero timer ID is from the outside not different than anything else.

0 ID is not being passed from outside but from within glibc. testcase is passing correct ID that it got with timer_create
it is the glibc wrapper code who is zeroing it out in nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c line 40


  If you pass an incorrect value your application
will crash.  Fix your own bugs instead of making the implementation
slower just because of your own inabilities.



This is a negative testcase from ltp testsuite ./testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c
It does not segfault when linked and run with linuxthreads. It segfaults when linked with linuxthreads and run
with NPTL.I thought NPTL is backward compatible. Do you think this testcase is invalid.? if yes then that will fix my bug.


Thanks for your response

Khem


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]