zpaqfranz: -DHWSHA2 segfaults on OpenBSD

$ uname -a
OpenBSD rosaelefanten.org 7.3 GENERIC.MP#1125 amd64
$ c++ -O2 -pipe   -Dunix -DHWSHA2 -o zpaqfranz zpaqfranz.cpp -lm -lpthread

Well…

$ zpaqfranz b -debug
48149: array franz flag size 57
48150: -715                   0  <<Runs just about like zpaq 7.15>>
48150: -append                0  <<Append-only (antiransomware, slow)>>
48150: -big                   0  <<Big>>
48150: -checksum              0  <<Do checksums>>
48150: -checktxt              0  <<Checktxt (MD5)>>
48150: -comment               0  <<Comment version>>
48150: -debug                 1  <<Activate debug mode>>
48150: -debug -zero           0  <<Add files but zero-filled (debugging)>>
48150: -debug -zero -kill     0  <<Add 0-byte long file (debugging)>>
48150: -desc                  0  <<Orderby desc>>
48150: -filelist              0  <<Create a filelist .txt>>
48150: -fix255                0  <<Fix 255>>
48150: -fixeml                0  <<Fix eml filenames>>
48150: -flat                  0  <<Flat filenames>>
48150: -force                 0  <<Force>>
48150: -forcewindows          0  <<Store ADS stuff                (default: NO)>>
48150: -forcezfs              0  <<Enforce using .zfs>>
48150: -frugal                0  <<Frugal backup>>
48150: -hashdeep              0  <<Hashdeep>>
48150: -hw                    0  <<Use HW SHA1>>
48150: -kill                  0  <<Kill>>
48150: -mm                    0  <<Memory mapped>>
48150: -noattributes          0  <<Nessun attributo>>
48150: -nodedup               0  <<Turn off deduplicator>>
48150: -noeta                 0  <<Do not show ETA>>
48150: -nopath                0  <<Do not store path>>
48150: -noqnap                0  <<Exclude QNAP snap & trash>>
48150: -norecursion           0  <<Do not recurse into folders (default: YES)>>
48150: -nosort                0  <<Do not sort file>>
48150: -pakka                 0  <<New output>>
48150: -paranoid              0  <<Paranoid>>
48150: -quiet                 0  <<Do not show filesystem errors>>
BROKEN-sparc64 = SIGBUS due to unaligned access when running tests
48150: -ramdisk               0  <<ramdisk>>
48150: -rename                0  <<Rename>>
48150: -sfxall                0  <<Sfx all>>
48150: -sfxforce              0  <<Sfx force>>
48150: -silent                0  <<Silent>>
48150: -space                 0  <<Do not check space/writeability>>
48150: -ssd                   0  <<SSD>>
48150: -stat                  0  <<Statistics>>
48150: -stdin                 0  <<stdin>>
48150: -stdout                0  <<stdout>>
48150: -store                 0  <<Store mode: no deduplication, no compression>>
48150: -tar                   0  <<TAR mode (store posix)>>
48150: -test                  0  <<Only do test>>
48150: -touch                 0  <<Force 'touch' on date (7.15 to zpaqfranz)>>
48150: -utc                   0  <<Use UTC time>>
48150: -utf                   0  <<UTF-8>>
48150: -verbose               0  <<Verbose output>>
48150: -verify                0  <<Verify>>
48150: -vss                   0  <<Enable Volume Shadow Copies>>
48150: -xls                   0  <<Do NOT force adding of XLS/PPT (default: NO)>>
48150: -zero                  0  <<Flag zero>>
48150: -zfs                   0  <<Do NOT ignore .zfs             (default: YES)>>
48150: /od                    0  <<Order by date>>
48150: /on                    0  <<Order by name>>
48150: /os                    0  <<Order by size>>
zpaqfranz v58.1e-JIT-L,HW SHA1/2,(2023-03-21)
FULL exename <</usr/local/pobj/zpaqfranz-58.1/zpaqfranz-58.1/zpaqfranz>>
42993: The chosen algo 3 SHA-1
1838: new ecx -380413
1843: new ebx -778088517
SSSE3 :OK
SSE41 :OK
SHA   :NO
Segmentation fault

As it does not segfault without -DHWSHA2, I presume that there is a bug hidden somewhere, probably related to “SHA: NO”?

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 22 (22 by maintainers)

Most upvoted comments

But how you get this warning?

sorry for intruding; the linker warnings on usage of “unsafe” functions were re-established in clang after 7.1, I believe sometime during 7.2-CURRENT.