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: bug in times.c


On 03/11/2013 11:51 AM, Siddhesh Poyarekar wrote:
> On 11 March 2013 16:17, Andreas Schwab <schwab@suse.de> wrote:
>> Holger Brunck <holger.brunck@keymile.com> writes:
>>
>>>     times_now = times (NULL);
>>
>> Why do you think this is a valid use of the function?
> 
> Probably because it's allowed on Linux:
> 
> http://linux.die.net/man/2/times
> 

yes it is allowed on linux.

> Of course, I don't know why it would be useful to call times(NULL).
> Maybe to just waste some time in a syscall.
>

the code is thirparty code. They use somehow the counter tick which gets
returned from times. There may be better solutions, but nevertheless it's a bug
in glibc.

Regards
Holger


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