Debian Patches

Status for libsonlib/1.1+git20220915.5cbc158+dfsg1-3

Patch Description Author Forwarded Bugs Origin Last update
fix_build_errors.patch Fix build errors and make the library build cleanly: - C/impl/sonLibTreap.c: stTreap_remove read rmnode after freeing it
(use-after-free); save the parent pointer before free().
- C/impl/stSafeC.c: nbytes was set but not used (with
-Werror=unused-but-set-variable this fails the build).
- include.mk: drop --pedantic from the release flags; sonLibList.c
uses sort_r which needs object<->function pointer casts that ISO C
forbids under -pedantic.
Andreas Tille <tille@debian.org> no
use_debian_packaged_quicktree.patch To avoid a code copy of quicktree here inside the quicktree package a static lib is built and used to link here Andreas Tille <tille@debian.org> no 2020-06-16
2to3.patch Port to Python3 Andreas Tille <tille@debian.org> no 2020-06-16
fix_test.patch Somehow the test suite was non-functional. Fix some PATHs here Andreas Tille <tille@debian.org> no 2020-06-16
rpath.patch No rpath Andreas Tille <tille@debian.org> no 2020-06-16
fix_warnings.patch Fix comparison between pointer and zero character constant ([-Werror=pointer-compare]) in C/impl/bioioC.c: the code compared the
pointer *string against the character constant '\0', which is always
true; it must compare the pointed-to character **string.
Andreas Tille <tille@debian.org> no
python313_compat.patch unittest.makeSuite() was removed in Python 3.13; use unittest.defaultTestLoader.loadTestsFromTestCase() instead so the test
suite runs on current Python.
Andreas Tille <tille@debian.org> no
fix_quicktree_clone_child_ids.patch Clear uninitialized child_ids before freeing cloned quicktree trees quicktree >= 2.5's clone_Tnode() (used by get_root_Tnode()) does not
initialize the child_ids member of the cloned nodes. free_Tnode()
frees child_ids whenever it is non-NULL, so freeing the tree returned by
get_root_Tnode() with free_Tree() frees uninitialized pointers and
corrupts the heap (seen as a segfault / heap corruption in the
sonLibTests neighbour-joining tests). Clear child_ids on the cloned
tree before freeing it.
Andreas Tille <tille@debian.org> no 2026-10-21
add_shared_library.patch Build a shared library libsonlib.so.1.1.0 in addition to the static one Upstream sonLib only builds the static archive sonLib.a. Add a parallel
target that compiles the same sources with -fPIC and links them into
libsonlib.so.1.1.0 (soname libsonlib.so.1). The shared library is linked
against the shared libquicktree so that the TreeREP symbols
(neighbour_joining_buildtree and friends) are resolved at run time and
consumers do not have to add -lquicktree themselves. The static archive
still leaves these symbols unresolved, so static consumers keep linking
-lquicktree.
Andreas Tille <tille@debian.org> no 2026-11-06
use_debian_packaged_cutest.patch Build against the Debian packaged CuTest instead of the copy in externalTools, which is not part of the repacked upstream
tarball. Add /usr/include/cutest to the include path (sonLib's
internal headers include CuTest.h) and link the test programs with
-lcutest from libcutest-dev.
Andreas Tille <tille@debian.org> no 2026-11-02
fix_char_getc_eof.patch Fix infinite loop in file line-reading on unsigned-char architectures getc(3) returns an int (0..255 or EOF, which is -1). The line-reading
helpers in sonLibFile.c and bioioC.c cast the result to char before
checking it against EOF. That cast is implementation-defined: on
architectures where plain char is unsigned (arm64, armhf, ppc64,
ppc64el, powerpc, s390x, ...) EOF (-1) becomes 255, so the
`ch == EOF` termination check never fires and the reader loops forever
on the last (newline-less or empty) line of a file.
.
This makes the sonLibTests suite hang indefinitely on those
architectures at test_stFile_getLineFromFile / benLine, causing the
build to be killed by the buildd timeout. Reading into an int64_t
directly without the char truncation fixes EOF detection everywhere and
is behaviour-identical on signed-char architectures.
Andreas Tille <tille@debian.org> no 2026-11-09
fix_stString_print_varargs.patch Fix undefined behaviour in stString_print test test_stString_print passes the integer literal 5 for an argument that
the format string consumes with the PRIi64 (int64_t) conversion. On
ABIs where varargs are passed on the stack (i386) or in a mixed
register/stack layout (hppa) this reads the wrong words and the test
fails with a garbage value (e.g. "foo 10903929910156347803952691740557
6524209428700210687939411819354183979772946877523748264649767777482424
97536.0" instead of "foo 5 7.0"). On amd64/arm64 the register-based
varargs happen to mask the bug. Cast the argument to int64_t so the
call is well-defined on every ABI.
Andreas Tille <tille@debian.org> no 2026-11-09

All known versions for source package 'libsonlib'

Links