public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>, Lukasz Majewski <lukma@denx.de>
Cc: Andreas Schwab <schwab@suse.de>, Paul Eggert <eggert@cs.ucla.edu>,
	Joseph Myers <joseph@codesourcery.com>,
	Florian Weimer <fweimer@redhat.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Stepan Golosunov <stepan@golosunov.pp.ru>,
	Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH] nptl: Handle NULL abstime [BZ #26394]
Date: Mon, 17 Aug 2020 10:58:04 -0300	[thread overview]
Message-ID: <17ab2619-7b27-028d-98c3-87056a4ef160@linaro.org> (raw)
In-Reply-To: <CAMe9rOpJaMOpAf_G+9q3ujmMgfOR1Wpi+eM7GVmea8RRRLCviw@mail.gmail.com>



On 17/08/2020 10:52, H.J. Lu wrote:
> On Mon, Aug 17, 2020 at 6:30 AM Lukasz Majewski <lukma@denx.de> wrote:
>>
>> Hi Andreas, H.J.,
>>
>>> On Aug 15 2020, H.J. Lu wrote:
>>>
>>>> From fa1f97680fca290a378c449f2b63682ee348fd2c Mon Sep 17 00:00:00
>>>> 2001 From: "H.J. Lu" <hjl.tools@gmail.com>
>>>> Date: Sat, 15 Aug 2020 11:06:35 -0700
>>>> Subject: [PATCH] nptl: Handle NULL abstime [BZ #26394]
>>>>
>>>> Since abstime passed to pthread_{clock|timed}join_np may be NULL,
>>
>> Could you point me to the exact reference that it is allowed (or
>> required) to pass NULL to this syscall?
>>
>> The one which I've found on the web:
>> https://linux.die.net/man/3/pthread_timedjoin_np
>>
>> doesn't mention about NULL pointer passed as the absolute time.
>> It says explicitly:
>> "The abstime argument is a structure of the following form, specifying
>> an absolute time measured since the Epoch"
>>
>>
>> As fair as I remember [1] glibc only handles the NULL pointer case when
>> it is explicitly written in the documentation/spec that NULL is passed
>> (like here: https://linux.die.net/man/2/timerfd_settime or here:
>> https://linux.die.net/man/2/utimensat).
>>
>> Link:
>> [1] -
>> https://sourceware.org/pipermail/libc-alpha/2019-November/108072.html
>>
> 
> sysdeps/pthread/tst-join14.c explicitly passes NULL:
> 
> static int
> do_test_clock (clockid_t clockid)
> {
>   pthread_t th = xpthread_create (NULL, tf, NULL);
> 
>   void *status;
>   int val = (clockid == CLOCK_USE_TIMEDJOIN)
>     ? pthread_timedjoin_np (th, &status, NULL)
>     : pthread_clockjoin_np (th, &status, clockid, NULL);
>   TEST_COMPARE (val, 0);
> 
>   if (status != (void *) 42l)
>     FAIL_EXIT1 ("return value %p, expected %p\n", status, (void *) 42l);
> 
>   return 0;
> }
> 

And it is a red-flag that you did not catch it running the testsuite.  Did you
check the patch with a full make check to certify there is no regressions?

  reply	other threads:[~2020-08-17 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 10:22 [PATCH v5] y2038: nptl: Convert pthread_{clock|timed}join_np to support 64 bit time Lukasz Majewski
2020-08-12 21:54 ` Alistair Francis
2020-08-12 23:11 ` Adhemerval Zanella
2020-08-15 18:11 ` [PATCH] nptl: Handle NULL abstime [BZ #26394] H.J. Lu
2020-08-17 10:22   ` Andreas Schwab
2020-08-17 12:04     ` H.J. Lu
2020-08-17 13:30     ` Lukasz Majewski
2020-08-17 13:52       ` H.J. Lu
2020-08-17 13:58         ` Adhemerval Zanella [this message]
2020-08-17 14:24           ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17ab2619-7b27-028d-98c3-87056a4ef160@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    --cc=schwab@suse.de \
    --cc=stepan@golosunov.pp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).