Source: libelfin
Followup-For: Bug #1065084
X-Debbugs-Cc: scho...@ubuntu.com

I've applied the attached debdiff in Ubuntu to fix the issue, as it
prevents llvm-defaults from migrating.

-- System Information:
Debian Release: trixie/sid
  APT prefers noble
  APT policy: (500, 'noble'), (100, 'noble-proposed')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.8.0-22-generic (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_USER, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru libelfin-0.3/debian/changelog libelfin-0.3/debian/changelog
--- libelfin-0.3/debian/changelog       2024-04-01 06:44:16.000000000 +0200
+++ libelfin-0.3/debian/changelog       2024-04-10 11:33:31.000000000 +0200
@@ -1,3 +1,9 @@
+libelfin (0.3-3.1ubuntu1) noble; urgency=medium
+
+  * Fix autopkgtests against newer clang (Closes: 1065084, LP: #2060786)
+
+ -- Simon Chopin <scho...@ubuntu.com>  Wed, 10 Apr 2024 11:33:31 +0200
+
 libelfin (0.3-3.1build1) noble; urgency=medium
 
   * No-change rebuild for CVE-2024-3094
diff -Nru 
libelfin-0.3/debian/patches/0003-don-t-use-a-VLA-just-to-compute-a-buffer-size.patch
 
libelfin-0.3/debian/patches/0003-don-t-use-a-VLA-just-to-compute-a-buffer-size.patch
--- 
libelfin-0.3/debian/patches/0003-don-t-use-a-VLA-just-to-compute-a-buffer-size.patch
        1970-01-01 01:00:00.000000000 +0100
+++ 
libelfin-0.3/debian/patches/0003-don-t-use-a-VLA-just-to-compute-a-buffer-size.patch
        2024-04-10 11:33:31.000000000 +0200
@@ -0,0 +1,26 @@
+From: Simon Chopin <simon.cho...@canonical.com>
+Date: Wed, 10 Apr 2024 11:25:19 +0200
+Subject: don't use a VLA just to compute a buffer size
+
+VLAs in C++ are compiler extensions, and clang will complain about it.
+
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libelfin/+bug/2060786
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065084
+Forwarded: https://github.com/aclements/libelfin/pull/82
+---
+ dwarf/small_vector.hh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dwarf/small_vector.hh b/dwarf/small_vector.hh
+index e73ab60..9437328 100644
+--- a/dwarf/small_vector.hh
++++ b/dwarf/small_vector.hh
+@@ -93,7 +93,7 @@ public:
+                 while (target < n)
+                         target <<= 1;
+ 
+-                char *newbuf = new char[sizeof(T[target])];
++                char *newbuf = new char[target * sizeof(T)];
+                 T *src = base, *dest = (T*)newbuf;
+                 for (; src < end; src++, dest++) {
+                         new(dest) T(*src);
diff -Nru libelfin-0.3/debian/patches/series libelfin-0.3/debian/patches/series
--- libelfin-0.3/debian/patches/series  2023-02-13 21:57:02.000000000 +0100
+++ libelfin-0.3/debian/patches/series  2024-04-10 11:33:31.000000000 +0200
@@ -1,2 +1,3 @@
 0001-Let-d-rules-override-library-version.patch
 0002-Remove-const-qualifier-from-setter.patch
+0003-don-t-use-a-VLA-just-to-compute-a-buffer-size.patch

Reply via email to