Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package honggfuzz for openSUSE:Factory 
checked in at 2022-08-29 09:44:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/honggfuzz (Old)
 and      /work/SRC/openSUSE:Factory/.honggfuzz.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "honggfuzz"

Mon Aug 29 09:44:06 2022 rev:12 rq:999853 version:2.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/honggfuzz/honggfuzz.changes      2021-04-22 
18:05:50.934683585 +0200
+++ /work/SRC/openSUSE:Factory/.honggfuzz.new.2083/honggfuzz.changes    
2022-08-29 09:44:08.419965602 +0200
@@ -1,0 +2,16 @@
+Thu Aug 25 12:48:49 UTC 2022 - Christophe Giboudeaux <[email protected]>
+
+- Update to 2.5
+  * fixed build for Android NDK >= 23
+  * fixed build for CygWin
+  * improved hfuzz-cc, so it supports -x correctly
+  * error returned if unknown cmd-line parameters are provided
+  * support for thread CPU pinning
+  * various fixes for *BSD
+  * increased number of dictionary entries (to 8192)
+- Add upstream changes to fix build with recent binutils:
+  * 0001-Always-pass-4-arguments-to-init_disassemble_info-no-.patch
+  * 0002-linux-bfd-use-DIAGNOSTIC_ERROR_SWITCH-define-to-figu.patch
+  * 0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch
+
+-------------------------------------------------------------------

Old:
----
  honggfuzz-2.4.tar.gz

New:
----
  0001-Always-pass-4-arguments-to-init_disassemble_info-no-.patch
  0002-linux-bfd-use-DIAGNOSTIC_ERROR_SWITCH-define-to-figu.patch
  0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch
  honggfuzz-2.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ honggfuzz.spec ++++++
--- /var/tmp/diff_new_pack.w03NnR/_old  2022-08-29 09:44:09.419967978 +0200
+++ /var/tmp/diff_new_pack.w03NnR/_new  2022-08-29 09:44:09.427967997 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package honggfuzz
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,17 @@
 
 
 Name:           honggfuzz
-Version:        2.4
+Version:        2.5
 Release:        0
 Summary:        Security-oriented fuzzer with various analysis options
 License:        Apache-2.0
 Group:          Development/Tools/Other
 URL:            https://honggfuzz.com
 Source:         
https://github.com/google/honggfuzz/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM -- binutils compatibility changes
+Patch0:         0001-Always-pass-4-arguments-to-init_disassemble_info-no-.patch
+Patch1:         0002-linux-bfd-use-DIAGNOSTIC_ERROR_SWITCH-define-to-figu.patch
+Patch2:         0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch
 BuildRequires:  binutils-devel
 BuildRequires:  libunwind-devel
 BuildRequires:  zlib-devel
@@ -34,7 +38,7 @@
 (software and hardware).
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 export CFLAGS="%{optflags}"

++++++ 0001-Always-pass-4-arguments-to-init_disassemble_info-no-.patch ++++++
>From 7eb2db0d3f4290ad7e24a7ff8ad4b1a42628a6b4 Mon Sep 17 00:00:00 2001
From: Robert Swiecki <[email protected]>
Date: Thu, 2 Jun 2022 23:17:49 +0200
Subject: [PATCH 1/3] Always pass 4 arguments to init_disassemble_info(), no
 matter what's the declaration. binutils/libopcode offers an unstable
 interface

---
 linux/bfd.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/linux/bfd.c b/linux/bfd.c
index 69f4da5..986081e 100644
--- a/linux/bfd.c
+++ b/linux/bfd.c
@@ -197,6 +197,24 @@ static int arch_bfdFPrintF(void* buf, const char* fmt, 
...) {
     return ret;
 }
 
+static int arch_bfdFPrintFStyled(void* buf, int style HF_ATTR_UNUSED, const 
char* fmt, ...) {
+    va_list args;
+    va_start(args, fmt);
+    int ret = util_vssnprintf(buf, _HF_INSTR_SZ, fmt, args);
+    va_end(args);
+
+    return ret;
+}
+
+/*
+ * binutils/libopcode has an unstable public interface. At some point in time 
the function
+ * init_disassemble_info() started taking 4 arguments instead of 3. Always 
pass 4 arguments to it,
+ * no matter what's the declaration.
+ */
+static void arch_bfdInitDisassembleInfoStub(
+    struct disassemble_info* info, char* instr, void* bfd_printf_func, void* 
bfd_printf_styled_func)
+    __attribute__((weakref, alias("init_disassemble_info")));
+
 void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) {
     MX_SCOPED_LOCK(&arch_bfd_mutex);
 
@@ -227,8 +245,9 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, 
char* instr) {
         return;
     }
 
-    struct disassemble_info info;
-    init_disassemble_info(&info, instr, arch_bfdFPrintF);
+    struct disassemble_info info = {};
+
+    arch_bfdInitDisassembleInfoStub(&info, instr, arch_bfdFPrintF, 
arch_bfdFPrintFStyled);
     info.arch          = bfd_get_arch(bfdh);
     info.mach          = bfd_get_mach(bfdh);
     info.buffer        = mem;
-- 
2.37.2


++++++ 0002-linux-bfd-use-DIAGNOSTIC_ERROR_SWITCH-define-to-figu.patch ++++++
>From e35ef0db3e45516ea34ffc820f13ec462a6cff03 Mon Sep 17 00:00:00 2001
From: Robert Swiecki <[email protected]>
Date: Mon, 6 Jun 2022 18:01:41 +0200
Subject: [PATCH 2/3] linux/bfd: use DIAGNOSTIC_ERROR_SWITCH define to figure
 out if init_disassemble_info takes 3 or 4 arguments

---
 linux/bfd.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/linux/bfd.c b/linux/bfd.c
index 986081e..e9d9c2b 100644
--- a/linux/bfd.c
+++ b/linux/bfd.c
@@ -26,6 +26,7 @@
 #include "linux/bfd.h"
 
 #include <bfd.h>
+#include <diagnostics.h>
 #include <dis-asm.h>
 #include <inttypes.h>
 #include <pthread.h>
@@ -61,7 +62,15 @@ typedef struct {
  */
 #if defined(FOR_EACH_DISASSEMBLER_OPTION)
 #define _HF_BFD_GE_2_29
-#endif
+#endif /* defined(FOR_EACH_DISASSEMBLER_OPTION) */
+/*
+ * binutils/libopcode has an unstable public interface. At some point in time 
the function
+ * init_disassemble_info() started taking 4 arguments instead of 3. Try to 
differentiate on the
+ * basis of some defines which apeared around the same time.
+ */
+#if defined(DIAGNOSTIC_ERROR_SWITCH)
+#define _HF_DISASM_4_ARGS
+#endif /* defined(DIAGNOSTIC_ERROR_SWITCH) */
 
 static pthread_mutex_t arch_bfd_mutex = PTHREAD_MUTEX_INITIALIZER;
 
@@ -197,7 +206,9 @@ static int arch_bfdFPrintF(void* buf, const char* fmt, ...) 
{
     return ret;
 }
 
-static int arch_bfdFPrintFStyled(void* buf, int style HF_ATTR_UNUSED, const 
char* fmt, ...) {
+#if defined(_HF_DISASM_4_ARGS)
+static int arch_bfdFPrintFStyled(
+    void* buf, enum disassembler_style style HF_ATTR_UNUSED, const char* fmt, 
...) {
     va_list args;
     va_start(args, fmt);
     int ret = util_vssnprintf(buf, _HF_INSTR_SZ, fmt, args);
@@ -205,15 +216,7 @@ static int arch_bfdFPrintFStyled(void* buf, int style 
HF_ATTR_UNUSED, const char
 
     return ret;
 }
-
-/*
- * binutils/libopcode has an unstable public interface. At some point in time 
the function
- * init_disassemble_info() started taking 4 arguments instead of 3. Always 
pass 4 arguments to it,
- * no matter what's the declaration.
- */
-static void arch_bfdInitDisassembleInfoStub(
-    struct disassemble_info* info, char* instr, void* bfd_printf_func, void* 
bfd_printf_styled_func)
-    __attribute__((weakref, alias("init_disassemble_info")));
+#endif /* defined(_HF_DISASM_4_ARGS) */
 
 void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) {
     MX_SCOPED_LOCK(&arch_bfd_mutex);
@@ -247,7 +250,11 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, 
char* instr) {
 
     struct disassemble_info info = {};
 
-    arch_bfdInitDisassembleInfoStub(&info, instr, arch_bfdFPrintF, 
arch_bfdFPrintFStyled);
+#if defined(_HF_DISASM_4_ARGS)
+    init_disassemble_info(&info, instr, arch_bfdFPrintF, 
arch_bfdFPrintFStyled);
+#else  /* defined(_HF_DISASM_4_ARGS) */
+    init_disassemble_info(&info, instr, arch_bfdFPrintF);
+#endif /* defined(_HF_DISASM_4_ARGS) */
     info.arch          = bfd_get_arch(bfdh);
     info.mach          = bfd_get_mach(bfdh);
     info.buffer        = mem;
-- 
2.37.2


++++++ 0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch ++++++
>From 6a757bb7a091d64b145d4e1a9b6c50f6b3ed51ea Mon Sep 17 00:00:00 2001
From: Robert Swiecki <[email protected]>
Date: Mon, 6 Jun 2022 18:11:28 +0200
Subject: [PATCH 3/3] linux/bfd: cover #include <diagnostics.h> with
 __has_include, because it appeared in 2018 only

---
 linux/bfd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/linux/bfd.c b/linux/bfd.c
index e9d9c2b..adae590 100644
--- a/linux/bfd.c
+++ b/linux/bfd.c
@@ -26,7 +26,11 @@
 #include "linux/bfd.h"
 
 #include <bfd.h>
+#if defined __has_include
+#if __has_include(<diagnostics.h>)
 #include <diagnostics.h>
+#endif /* __has_include(<diagnostics.h>) */
+#endif /* defined __has_include */
 #include <dis-asm.h>
 #include <inttypes.h>
 #include <pthread.h>
-- 
2.37.2


++++++ honggfuzz-2.4.tar.gz -> honggfuzz-2.5.tar.gz ++++++
/work/SRC/openSUSE:Factory/honggfuzz/honggfuzz-2.4.tar.gz 
/work/SRC/openSUSE:Factory/.honggfuzz.new.2083/honggfuzz-2.5.tar.gz differ: 
char 14, line 1

Reply via email to