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 v2] elf: Fix pldd (BZ#18035)


17.04.2019 16:42 Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
> [...]
> 	[BZ #18035]
> 	* elf/Makefile (tests-container): Add tst-pldd.
> 	* elf/pldd-xx.c: Use _Static_assert in of pldd_assert.
> 	(E(find_maps)): Avoid use alloca, use default read file operations
> 	instead of explicit LFS names, and fix infinite	loop.
> 	* elf/pldd.c: Explicit set _FILE_OFFSET_BITS, cleanup headers.
> 	(get_process_info): Use _Static_assert instead of assert, use default
> 	directory operations instead of explicit LFS names, and free some
> 	leadek pointers.
> 	* elf/tst-pldd.c: New file.

This test (elf/tst-pldd.c) always times out for me, even with some large
timeout factors.  Having read the description of the bug and the patch
I believe it's not a simple timeout but a permanent hang instead.  Also
please see below:

> [...]
> diff --git a/elf/tst-pldd.c b/elf/tst-pldd.c
> new file mode 100644
> index 0000000000..ed19cedd05
> --- /dev/null
> +++ b/elf/tst-pldd.c
> @@ -0,0 +1,118 @@
> + [...]
> +static int
> +do_test (void)
> +{
> +  /* Create a copy of current test to check with pldd.  */
> +  struct support_subprocess target = support_subprocess (target_process,
> NULL);
> +
> +  /* Run 'pldd' on test subprocess.  */
> +  struct support_capture_subprocess pldd;
> +  {
> +    /* Three digits per byte plus null terminator.  */
> +    char pid[3 * sizeof (uint32_t) + 1];
> +    snprintf (pid, array_length (pid), "%d", target.pid);
> +
> +    const char prog[] = "/usr/bin/pldd";

My guess is that the reason is that it launches and tests the system
installed /usr/bin/pldd which most likely contains the bug which is fixed
by this patch.  Would you consider replacing "/usr/bin/pldd" with "./pldd"
or whatever path is required to use the correct pldd?

Thanks and regards,

Rafal


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