Package: ptl Version: 2.3.0-1 Followup-For: Bug #1001237 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jammy ubuntu-patch X-Debbugs-Cc: sl...@ubuntu.com Control: tags -1 patch
Hello Stephan, I can observe the same issue with 2.3.0-1 on Ubuntu and filed an upstream bug at https://github.com/jrmadsen/PTL/issues/25 The intmax_t division seems to be the root-cause here, replacing the division in the minimal.cc example with a constant is a (temporary) way to mitigate this problem. In Ubuntu, the attached patch was applied to achieve the following: * Add d/p/mitigate-SIGFPE.diff to mitigate minimal.cc crash in autopkgtest Thanks for considering the patch. Cheers, Lukas -- System Information: Debian Release: 11.0 APT prefers impish-updates APT policy: (500, 'impish-updates'), (500, 'impish-security'), (500, 'impish'), (100, 'impish-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.13.0-22-generic (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff --- ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff 1970-01-01 01:00:00.000000000 +0100 +++ ptl-2.3.0/debian/patches/mitigate-SIGFPE.diff 2021-12-13 15:32:33.000000000 +0100 @@ -0,0 +1,20 @@ +Description: Mitigate SIGFPE crash in minimal.cc by avoiding maxint_t divison +Author: Lukas Märdian <sl...@ubuntu.com> +Bug: https://github.com/jrmadsen/PTL/issues/25 +Bug-Debian: https://bugs.debian.org/1001237 +Origin: vendor, Ubuntu +Last-Update: 2021-12-13 +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- ptl-2.3.0.orig/examples/minimal/minimal.cc ++++ ptl-2.3.0/examples/minimal/minimal.cc +@@ -135,7 +135,7 @@ main(int argc, char** argv) + static intmax_t idx = 0; + static intmax_t ncores = Threading::GetNumberOfCores(); + static intmax_t ncpus = Threading::GetNumberOfPhysicalCpus(); +- static intmax_t nincr = std::max<intmax_t>(ncores / ncpus, 1); ++ static intmax_t nincr = 1; + auto _idx = idx + nincr; + idx += nincr; + if(_idx % ncores == 0) diff -Nru ptl-2.3.0/debian/patches/series ptl-2.3.0/debian/patches/series --- ptl-2.3.0/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ ptl-2.3.0/debian/patches/series 2021-12-13 15:29:29.000000000 +0100 @@ -0,0 +1 @@ +mitigate-SIGFPE.diff