From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH v7 4/4] posix: Add posix_spawn_file_actions_addclosefrom_np
Date: Thu, 8 Jul 2021 20:23:18 -0300 [thread overview]
Message-ID: <dd42122e-849a-4c1e-0db4-45d68809ab35@linaro.org> (raw)
In-Reply-To: <CAMe9rOoEcrCodGhG8hPJGFjPdQg=u7_Kvun3T7-WLVs4WiGQ_A@mail.gmail.com>
On 08/07/2021 18:54, H.J. Lu wrote:
> On Thu, Jul 8, 2021 at 9:12 AM Adhemerval Zanella via Libc-alpha
> <libc-alpha@sourceware.org> wrote:
>>
>>
>>
>> On 08/07/2021 11:34, Florian Weimer wrote:
>>> Some of the new files use:
>>>
>>>> + <http://www.gnu.org/licenses/>. */
>>>
>>> That should be: https://
>>
>> Ack.
>>
>>>
>>>> +/* Called on process re-execution. The arguments are the expected opened
>>>> + file descriptors. */
>>>> +_Noreturn static void
>>>> +handle_restart (int argc, char *argv[])
>>>> +{
>>>> + size_t nfds = argc > 1 ? argc - 1 : 0;
>>>> + struct fd_t
>>>> + {
>>>> + int fd;
>>>> + _Bool found;
>>>> + } *fds = xmalloc (sizeof (struct fd_t) * nfds);
>>>> + for (int i = 0; i < nfds; i++)
>>>> + {
>>>> + char *endptr;
>>>> + long unsigned int fd = strtoul (argv[i+1], &endptr, 10);
>>>> + if (*endptr != '\0' || fd > INT_MAX)
>>>> + FAIL_EXIT1 ("readdir: invalid file descriptor value: %s", argv[i]);
>>>
>>> Should be:
>>>
>>> FAIL_EXIT1 ("argv[%d]: invalid file descriptor value: %s", i, argv[i]);
>>
>> Ack.
>>
>>>
>>>> @@ -344,7 +346,9 @@ __spawnix (pid_t * pid, const char *file,
>>>> /* We need at least a few pages in case the compiler's stack checking is
>>>> enabled. In some configs, it is known to use at least 24KiB. We use
>>>> 32KiB to be "safe" from anything the compiler might do. Besides, the
>>>> - extra pages won't actually be allocated unless they get used. */
>>>> + extra pages won't actually be allocated unless they get used.
>>>> + It also acts the slack for spawn_closefrom (including MIPS64 getdents64
>>>> + where it might use about 1k extra stack space. */
>>>
>>> Missing closing parenthesis.
>>>
>>> Rest looks okay to me, thanks. No need to post a new verison, I think.
>>
>> Thanks, I will respin another round of tests and commit.
>
> On x86-64, I saw:
>
> FAIL: posix/tst-spawn5
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28067
>
> Has anyone else seen it?
I reproduced it with --enable-hardcoded-path-in-tests, this is most
likely something wrong I doing with the parameters to respawn the
process. I will fix it.
next prev parent reply other threads:[~2021-07-08 23:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 14:58 [PATCH v7 0/4] Add close_range, closefrom, and posix_spawn_file_actions_closefrom_np Adhemerval Zanella via Libc-alpha
2021-07-06 14:58 ` [PATCH v7 1/4] support: Add support_stack_alloc Adhemerval Zanella via Libc-alpha
2021-07-07 10:17 ` Florian Weimer via Libc-alpha
2021-07-07 12:17 ` Adhemerval Zanella via Libc-alpha
2021-07-07 17:15 ` Florian Weimer via Libc-alpha
2021-07-07 17:26 ` Adhemerval Zanella via Libc-alpha
2021-07-08 5:43 ` Florian Weimer via Libc-alpha
2021-07-08 12:33 ` Adhemerval Zanella via Libc-alpha
2021-07-06 14:58 ` [PATCH v7 2/4] linux: Add close_range Adhemerval Zanella via Libc-alpha
2021-07-07 10:22 ` Florian Weimer via Libc-alpha
2021-07-07 12:51 ` Adhemerval Zanella via Libc-alpha
2021-07-07 12:53 ` Florian Weimer via Libc-alpha
2021-07-06 14:58 ` [PATCH v7 3/4] io: Add closefrom [BZ #10353] Adhemerval Zanella via Libc-alpha
2021-07-07 10:39 ` Florian Weimer via Libc-alpha
2021-07-07 12:55 ` Adhemerval Zanella via Libc-alpha
2021-07-06 14:58 ` [PATCH v7 4/4] posix: Add posix_spawn_file_actions_addclosefrom_np Adhemerval Zanella via Libc-alpha
2021-07-08 14:34 ` Florian Weimer via Libc-alpha
2021-07-08 16:12 ` Adhemerval Zanella via Libc-alpha
2021-07-08 21:54 ` H.J. Lu via Libc-alpha
2021-07-08 23:23 ` Adhemerval Zanella via Libc-alpha [this message]
2021-07-06 19:28 ` [PATCH v7 0/4] Add close_range, closefrom, and posix_spawn_file_actions_closefrom_np DJ Delorie via Libc-alpha
2021-07-06 19:33 ` Adhemerval Zanella via Libc-alpha
2021-07-06 19:38 ` Adhemerval Zanella via Libc-alpha
2021-07-06 19:47 ` DJ Delorie via Libc-alpha
2021-07-06 20:23 ` Adhemerval Zanella via Libc-alpha
2021-07-06 20:30 ` DJ Delorie via Libc-alpha
2021-07-06 21:33 ` DJ Delorie via Libc-alpha
2021-07-07 2:14 ` Adhemerval Zanella via Libc-alpha
2021-07-07 2:26 ` DJ Delorie via Libc-alpha
2021-07-06 19:42 ` DJ Delorie via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd42122e-849a-4c1e-0db4-45d68809ab35@linaro.org \
--to=libc-alpha@sourceware.org \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
/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).