Public bug reported:

The build on ppc64el fails with the following error:

plt.c: In function ‘arch_elf_add_plt_entry’:
plt.c:781:17: error: ‘libsym’ may be used uninitialized in this function 
[-Werror=maybe-uninitialized]
  781 |                 free(libsym);
      |                 ^~~~~~~~~~~~
cc1: all warnings being treated as errors


This seems to be happening because our back-port of this upstream patch is 
wrong:

commit 7f20cb21a0d021ab3b12d8a5187beb728f339b0f
Author:     Thierry Fauck <thie...@linux.vnet.ibm.com>
AuthorDate: Tue May 13 07:48:24 2014 -0400
Commit:     Petr Machata <pmach...@gmail.com>
CommitDate: Wed Nov 11 19:08:43 2015 +0100

    Support for powerpc64 arch ppc64el

    Signed-off-by: Thierry Fauck <thie...@linux.vnet.ibm.com>

            Add support for ppc64le proc and ELF ABIv2.
            Provides support for irelative and wchar


The original patch leans on a jump to a "fail" label (that is declared near the 
beginning of the function and does the following):

  free(name);
  return PLT_FAIL;

In the 0.7.3 code, however, a different definition of the "fail" label
exists. It is declared later in the function and relies on the libsym
variable being initialized:

  free(name);
  free(libsym);
  return plt_fail;

** Affects: ltrace (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1967518

Title:
  ltrace - build on ppc64el fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ltrace/+bug/1967518/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to