Accepting request 786331 from devel:tools
OBS-URL: https://build.opensuse.org/request/show/786331 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/honggfuzz?expand=0&rev=9
This commit is contained in:
commit
8e36a607c2
49
0001-fix-some-m32-compilation-issues-type-casting.patch
Normal file
49
0001-fix-some-m32-compilation-issues-type-casting.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From aa1c3ccd0f9e2ed884ba877f2153b40c1448e6b9 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Swiecki <robert@swiecki.net>
|
||||
Date: Thu, 5 Mar 2020 14:40:05 +0100
|
||||
Subject: [PATCH] fix some -m32 compilation issues (type casting)
|
||||
|
||||
---
|
||||
linux/trace.c | 4 ++--
|
||||
report.c | 3 +--
|
||||
2 files changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/linux/trace.c b/linux/trace.c
|
||||
index 5a99363..3a22234 100644
|
||||
--- a/linux/trace.c
|
||||
+++ b/linux/trace.c
|
||||
@@ -531,7 +531,7 @@ static void arch_traceSaveData(run_t* run, pid_t pid) {
|
||||
PLOG_W("Couldn't get siginfo for pid %d", pid);
|
||||
}
|
||||
|
||||
- uint64_t crashAddr = (uint64_t)si.si_addr;
|
||||
+ uint64_t crashAddr = (uint64_t)(uintptr_t)si.si_addr;
|
||||
/* User-induced signals don't set si.si_addr */
|
||||
if (SI_FROMUSER(&si)) {
|
||||
crashAddr = 0UL;
|
||||
@@ -571,7 +571,7 @@ static void arch_traceSaveData(run_t* run, pid_t pid) {
|
||||
" instr: '%s'",
|
||||
pid, si.si_signo, si.si_errno, si.si_code, si.si_addr, pc, crashAddr, instr);
|
||||
|
||||
- if (!SI_FROMUSER(&si) && pc && crashAddr < (uint64_t)run->global->linux.ignoreAddr) {
|
||||
+ if (!SI_FROMUSER(&si) && pc && crashAddr < (uint64_t)(uintptr_t)run->global->linux.ignoreAddr) {
|
||||
LOG_I("Input is interesting (%s), but the si.si_addr is %p (below %p), skipping",
|
||||
util_sigName(si.si_signo), si.si_addr, run->global->linux.ignoreAddr);
|
||||
return;
|
||||
diff --git a/report.c b/report.c
|
||||
index 65af26d..383b273 100644
|
||||
--- a/report.c
|
||||
+++ b/report.c
|
||||
@@ -146,8 +146,7 @@ void report_appendReport(pid_t pid, run_t* run, funcs_t* funcs, size_t funcCnt,
|
||||
run->report, sizeof(run->report), "STACK HASH: %016" PRIx64 "\n", run->backtrace);
|
||||
util_ssnprintf(run->report, sizeof(run->report), "STACK:\n");
|
||||
for (size_t i = 0; i < funcCnt; i++) {
|
||||
- util_ssnprintf(
|
||||
- run->report, sizeof(run->report), " <0x%016" PRIx64 "> ", (uint64_t)funcs[i].pc);
|
||||
+ util_ssnprintf(run->report, sizeof(run->report), " <0x%016tx> ", (uintptr_t)funcs[i].pc);
|
||||
util_ssnprintf(run->report, sizeof(run->report), "[func:%s file:%s line:%zu module:%s]\n",
|
||||
funcs[i].func, funcs[i].file, funcs[i].line, funcs[i].module);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 18 22:57:55 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
|
||||
|
||||
- Add upstream patch to fix the i586 build:
|
||||
* 0001-fix-some-m32-compilation-issues-type-casting.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 17 13:07:16 UTC 2020 - Martin Pluskal <mpluskal@suse.com>
|
||||
|
||||
|
@ -24,6 +24,7 @@ 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
|
||||
Patch0: 0001-fix-some-m32-compilation-issues-type-casting.patch
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: libunwind-devel
|
||||
BuildRequires: zlib-devel
|
||||
@ -35,6 +36,7 @@ evolutionary, feedback-driven fuzzing based on code coverage
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
Loading…
Reference in New Issue
Block a user