]> git.puffer.fish Git - mirror/frr.git/commitdiff
debian: fix clippy symbol lookup for mips64el
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 5 Jan 2023 16:49:41 +0000 (17:49 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 5 Jan 2023 16:49:41 +0000 (17:49 +0100)
misp64el build was SEGVing due to hitting a wonky codepath in clippy's
ELF magic.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
debian/.gitignore
debian/changelog
debian/patches/series
debian/patches/xref_symvalid.patch [new file with mode: 0644]

index 38cd0328a2c748b8621f780f54a3eb363ca71c1f..0aac57b26ef07f4423e823b7a1d21fbf4d73db2e 100644 (file)
@@ -5,7 +5,7 @@
 !/source
 !/patches/
 !/patches/xref_mips64el_pcrel.patch
-!/patches/sphinx-missing-overrides.patch
+!/patches/xref_symvalid.patch
 
 /*.log
 /*.substvars
index 77740905596099902c974f1e07bf979fd2872f94..a21fbbebf9206a4037bffa04583a0182ea88fdc4 100644 (file)
@@ -2,6 +2,7 @@ frr (8.4.1-2) UNRELEASED; urgency=medium
 
   * commit to git tarball as source instead of dist tarball
   * ditch unneeded sphinx missing files patch
+  * fix clippy symbol lookup issue (build SEGV on mips64el)
 
  -- David Lamparter <equinox-debian@diac24.net>  Thu, 05 Jan 2023 17:44:59 +0100
 
index b31ffb39decc91d123bfe9aac087585f3e265da9..d557f1fc296219ad9616eaa79f8258b938927b44 100644 (file)
@@ -1 +1,2 @@
 xref_mips64el_pcrel.patch
+xref_symvalid.patch
diff --git a/debian/patches/xref_symvalid.patch b/debian/patches/xref_symvalid.patch
new file mode 100644 (file)
index 0000000..d80d216
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/lib/elf_py.c b/lib/elf_py.c
+index 75d2d6007f83..7c503cfb9db3 100644
+--- a/lib/elf_py.c
++++ b/lib/elf_py.c
+@@ -293,7 +293,7 @@ static PyObject *elfreloc_getsection(PyObject *self, PyObject *args)
+       if (!w->es)
+               Py_RETURN_NONE;
+-      if (w->symidx == 0) {
++      if (!w->symvalid || w->symidx == 0) {
+               size_t idx = 0;
+               Elf_Scn *scn;