Debian Bug report logs - #978467
libfsxfs: memory tests fundamentally broken, please disable them on riscv64

version graph

Package: src:libfsxfs; Maintainer for src:libfsxfs is Debian Security Tools <[email protected]>;

Reported by: Aurelien Jarno <[email protected]>

Date: Sun, 27 Dec 2020 19:51:22 UTC

Severity: normal

Tags: ftbfs, patch, upstream

Found in version libfsxfs/20201117-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Security Tools <[email protected]>:
Bug#978467; Package src:libfsxfs. (Sun, 27 Dec 2020 19:51:24 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Security Tools <[email protected]>. (Sun, 27 Dec 2020 19:51:24 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Aurelien Jarno <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: libfsxfs: memory tests fundamentally broken, please disable them on riscv64
Date: Sun, 27 Dec 2020 20:50:30 +0100
Source: libfsxfs
Version: 20201117-1
Severity: normal 
Tags: ftbfs patch upstream
User: [email protected]
Usertags: riscv64

Hi,

fails to build on riscv64:
https://buildd.debian.org/status/fetch.php?pkg=libfsxfs&arch=riscv64&ver=20201117-1&stamp=1607268287&raw=0

This is due to fundamentally broken tests assuming that memcpy and
memset can fail returning NULL, and interposing these libc functions in
the tests with functions that sometimes return NULL. This tests should
be simply removed as they do not make sense. See bug #978433 for more
details as the same code is basically replicated in dozen of packages.

A simpler way to fix the issue for riscv64 is to disable all memory
tests on this architecture, as it is already done for a long list of
cases. This is what the patch below does:

--- libfsxfs-20201117/debian/patches/01-disable-memory-tests-on-riscv64.patch	1970-01-01 01:00:00.000000000 +0100
+++ libfsxfs-20201117/debian/patches/01-disable-memory-tests-on-riscv64.patch	2020-12-27 14:51:14.000000000 +0100
@@ -0,0 +1,11 @@
+--- libfsxfs-20201117.orig/tests/fsxfs_test_memory.h
++++ libfsxfs-20201117/tests/fsxfs_test_memory.h
+@@ -28,7 +28,7 @@
+ extern "C" {
+ #endif
+ 
+-#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBFSXFS_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __mips__ ) && !defined( __sparc__ ) && !defined( HAVE_ASAN )
++#if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( LIBFSXFS_DLL_IMPORT ) && !defined( __arm__ ) && !defined( __clang__ ) && !defined( __CYGWIN__ ) && !defined( __hppa__ ) && !defined( __mips__ ) && !defined( __sparc__ ) && !defined( __riscv ) && !defined( HAVE_ASAN )
+ #define HAVE_FSXFS_TEST_MEMORY		1
+ #endif
+ 
--- libfsxfs-20201117/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libfsxfs-20201117/debian/patches/series	2020-12-27 14:51:14.000000000 +0100
@@ -0,0 +1 @@
+01-disable-memory-tests-on-riscv64.patch

Regards,
Aurelien



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 05:11:49 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.