Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828584 - mail-filter/rspamd-3.1: libcryptobox/cryptobox.c:151: Error: bad register name `%rax'
Summary: mail-filter/rspamd-3.1: libcryptobox/cryptobox.c:151: Error: bad register nam...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: Petr Vaněk
URL: https://github.com/rspamd/rspamd/comm...
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2021-12-08 21:31 UTC by Marcin Mirosław
Modified: 2022-11-06 06:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,246.60 KB, text/plain)
2021-12-08 21:36 UTC, Marcin Mirosław
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2021-12-08 21:31:57 UTC
Another bug on x86 arch with rspamd.

FAILED: src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o
/usr/bin/i686-pc-linux-gnu-gcc -DDOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS -DDOCTEST_CONFIG_USE_STD_HEADERS -DHAVE_CONFIG_H -DSYS_ZSTD -DU_CHARSET_IS_UTF8 -Drspamd_server_EXPORTS -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/hiredis -I/var/tmp/portage/mail-filter/rspamd-
3.1/work/rspamd-3.1 -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libutil -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libserver -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/
libmime -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libstat -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/libucl -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/co
ntrib/replxx/include -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/uthash -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/http-parser -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/fpconv -I/var/tmp/portage/mail-filter/rspamd-3.1
/work/rspamd-3.1/contrib/libottery -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/xxhash -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/cdb -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/librdns -I/var/tmp/portage/mail-filter/rsp
amd-3.1/work/rspamd-3.1/contrib/aho-corasick -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/lc-btrie -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/lua-lpeg -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/frozen/include -I/var/tmp
/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/fu2/include -Isrc -Isrc/libcryptobox -I/usr/include/lua5.1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/hs  -O2 -march=core2 -mtune=native -pipe -g -fPIC -D_GNU_SOURCE -DLINUX -Wextra -Wall -Wpointer-arith -W
no-unused-parameter -Wno-unused-function -Wunused-variable -Wno-pointer-sign -Wstrict-prototypes -Wno-strict-aliasing -fno-strict-aliasing -Wnull-dereference -Wduplicated-cond -Wno-unused-const-variable -Wno-sign-compare -Wno-implicit-fallthrough -Wmissing-noreturn -Wmissing-format-att
ribute -fPIC -std=gnu11 -MD -MT src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o -MF src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o.d -o src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o -c /var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/li
bcryptobox/cryptobox.c
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c: Assembler messages:
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:151: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:152: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:153: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:154: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c: In function 'rspamd_cryptobox_fast_hash_final':
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:1615:17: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1615 |         guint64 ret;
      |                 ^~~


Reproducible: Always

Actual Results:  
FAILED: src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o
/usr/bin/i686-pc-linux-gnu-gcc -DDOCTEST_CONFIG_NO_MULTI_LANE_ATOMICS -DDOCTEST_CONFIG_USE_STD_HEADERS -DHAVE_CONFIG_H -DSYS_ZSTD -DU_CHARSET_IS_UTF8 -Drspamd_server_EXPORTS -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/hiredis -I/var/tmp/portage/mail-filter/rspamd-
3.1/work/rspamd-3.1 -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libutil -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libserver -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/
libmime -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libstat -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/libucl -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/co
ntrib/replxx/include -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/uthash -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/http-parser -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/fpconv -I/var/tmp/portage/mail-filter/rspamd-3.1
/work/rspamd-3.1/contrib/libottery -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/xxhash -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/cdb -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/librdns -I/var/tmp/portage/mail-filter/rsp
amd-3.1/work/rspamd-3.1/contrib/aho-corasick -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/lc-btrie -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/lua-lpeg -I/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/frozen/include -I/var/tmp
/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/contrib/fu2/include -Isrc -Isrc/libcryptobox -I/usr/include/lua5.1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/hs  -O2 -march=core2 -mtune=native -pipe -g -fPIC -D_GNU_SOURCE -DLINUX -Wextra -Wall -Wpointer-arith -W
no-unused-parameter -Wno-unused-function -Wunused-variable -Wno-pointer-sign -Wstrict-prototypes -Wno-strict-aliasing -fno-strict-aliasing -Wnull-dereference -Wduplicated-cond -Wno-unused-const-variable -Wno-sign-compare -Wno-implicit-fallthrough -Wmissing-noreturn -Wmissing-format-att
ribute -fPIC -std=gnu11 -MD -MT src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o -MF src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o.d -o src/CMakeFiles/rspamd-server.dir/libcryptobox/cryptobox.c.o -c /var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/li
bcryptobox/cryptobox.c
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c: Assembler messages:
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:151: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:152: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:153: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:154: Error: bad register name `%rax'
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c: In function 'rspamd_cryptobox_fast_hash_final':
/var/tmp/portage/mail-filter/rspamd-3.1/work/rspamd-3.1/src/libcryptobox/cryptobox.c:1615:17: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
 1615 |         guint64 ret;
      |                 ^~~


Expected Results:  
compile without error

# emerge --info
Portage 3.0.28 (python 3.9.8-final-0, default/linux/x86/17.0/hardened, gcc-11.2.0, glibc-2.33-r7, 5.11.8-gentoo-r1 i686)
=================================================================
System uname: Linux-5.11.8-gentoo-r1-i686-Intel_Xeon_E312xx_-Sandy_Bridge,_IBRS_update-with-glibc2.33
KiB Mem:     9779740 total,   6275476 free
KiB Swap:     511996 total,    511996 free
Timestamp of repository gentoo: Wed, 08 Dec 2021 19:36:43 +0000
Head commit of repository gentoo: 0cfa53e6edcd1ddba55aa033f3e3e9e9714ad958

sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          2.7.18_p9::gentoo, 3.6.13_p3::gentoo, 3.7.10_p3::gentoo, 3.8.9_p2::gentoo, 3.9.8::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.44.9::gentoo
sys-apps/sandbox:         2.25::gentoo
sys-devel/autoconf:       2.69-r5::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    sync-user: portage:portage
    priority: -1000

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -mtune=native -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -mtune=native -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl acpi aio async bash-completion bzip2 caps chroot clamav clamdtop filecaps ftp hardened iconv idn iproute2 libglvnd libtirpc logrotate mmap mmx mmxext ncurses network-cron nptl openmp openssl pam pcre pic pie readline seccomp split-usr sqlite sse sse2 ssl ssp syslog threads threadsafe unicode vhosts vim vim-pager vim-syntax x86 xattr xtpax zlib" ABI_X86="32" ADA_TARGET="gnat_2020" APACHE2_MODULES="access_compat actions alias auth_basic authn_alias authn_anon authn_core authn_file authz_core authz_host authz_groupfile deflate dir env expires filter headers http2 include info log_config logio mime mime_magic negotiation rewrite setenvif socache_shmcb status unique_id unixd usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory conntrack contextswitch cpu disk entropy ethstat network ntpd processes python swap syslog uptime vmem" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 pni" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="geoip tarpit"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Marcin Mirosław 2021-12-08 21:36:31 UTC
Created attachment 757768 [details]
build.log

build.log
Comment 2 Ionen Wolkens gentoo-dev 2021-12-09 03:20:34 UTC
>-- Compilation of sse42 asm set is supported

Seems it's being confused by your x86_64 SandyBridge

%rax is guarded behind #ifdef HAVE_SSE42" but doesn't check if !x86_64
Comment 3 Sven Vogel 2022-03-30 11:57:23 UTC
i have the same problem. there ary workarounds or ideas to get it running?
Comment 4 Larry the Git Cow gentoo-dev 2022-11-06 06:17:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e22b9e780258d9aede2b057cff5e7ab8b9c6af2f

commit e22b9e780258d9aede2b057cff5e7ab8b9c6af2f
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2022-11-05 19:20:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-06 06:16:51 +0000

    mail-filter/rspamd: drop 3.0-r4, 3.1-r2, 3.2
    
    Issues from two bugs bellow seems to be fixed in more recent versions.
    
    Closes: https://bugs.gentoo.org/817866
    Closes: https://bugs.gentoo.org/828584
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Signed-off-by: Sam James <sam@gentoo.org>

 mail-filter/rspamd/Manifest                        |   3 -
 .../files/rspamd-3.0-fix-null-dereference.patch    |  46 --------
 .../rspamd/files/rspamd-3.0-system-doctest.patch   |  72 ------------
 .../rspamd/files/rspamd-3.0-system-libfmt.patch    |  48 --------
 mail-filter/rspamd/rspamd-3.0-r4.ebuild            | 128 --------------------
 mail-filter/rspamd/rspamd-3.1-r2.ebuild            | 128 --------------------
 mail-filter/rspamd/rspamd-3.2.ebuild               | 129 ---------------------
 7 files changed, 554 deletions(-)