Summary: | dev-lang/tcl-8.6.11 builds with clang, but the result does not work properly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andreas K. Hüttel <dilfridge> |
Component: | Current packages | Assignee: | TCL/TK Project <tcltk> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 2b57, sam, telans |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://core.tcl-lang.org/tcl/info/206e58994f3806ec | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 832316 | ||
Bug Blocks: | 915000, 828105 | ||
Attachments: |
built and test log, until interrupted with ctl-c
sanitizer build log build.log CFLAGS+="-D_FORTIFY_SOURCE=2" and FEATURES="test" |
Description
Andreas K. Hüttel
2021-12-02 21:44:03 UTC
Created attachment 757226 [details]
built and test log, until interrupted with ctl-c
dilfridge-clang ~ # emerge --info Portage 3.0.28 (python 3.9.9-final-0, default/linux/amd64/17.1/systemd, gcc-11.2.1, glibc-2.33-r7, 5.10.78-gentoo-dist x86_64) ================================================================= System uname: Linux-5.10.78-gentoo-dist-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.33 KiB Mem: 65785484 total, 14557808 free KiB Swap: 67108856 total, 67103224 free Timestamp of repository gentoo: Wed, 01 Dec 2021 16:30:01 +0000 Head commit of repository gentoo: 63d70212888254daff66584c4fab5613bfaa2966 sh bash 5.1_p12 ld GNU ld (Gentoo 2.37_p1 p1) 2.37 app-shells/bash: 5.1_p12::gentoo dev-lang/perl: 5.34.0-r5::gentoo dev-lang/python: 3.9.9::gentoo, 3.10.0_p1::gentoo dev-util/cmake: 3.22.0::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r1::gentoo sys-devel/gcc: 11.2.1_p20211127::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CC="x86_64-pc-linux-gnu-clang" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXX="x86_64-pc-linux-gnu-clang++" CXXFLAGS="-O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--jobs=5 --load=19.0 --keep-going --with-bdeps=y" 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 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch 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 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld" MAKEOPTS="-j 17 -l 18.0" 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 amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS I can only reproduce this when building without -D_FORTIFY_SOURCE=2 in my CFLAGS. Do the tests pass for you when adding that? Attached partial build/test log when compiled with -fsanitize=address,undefined and _without_ -D_FORTIFY_SOURCE=2 Notable issues: /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclBasic.c:3546:28: runtime error: null pointer passed as argument 2, which is declared to never be null /usr/include/string.h:44:28: note: nonnull attribute specified here /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclStrToD.c:1324:5: runtime error: negation of -9223372036854775808 cannot be represented in type 'long'; cast to an unsigned type to negate this value to itself /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclClock.c:472:52: runtime error: signed integer overflow: 9223372036854775807 + 210866803200 cannot be represented in type 'long' /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclExecute.c:6385:17: runtime error: left shift of negative value -242 ==292==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x5b8d800 bytes #0 0x7f6e2bc49e9d in malloc /usr/src/debug/sys-libs/compiler-rt-sanitizers-13.0.1_rc1/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3 #1 0x7f6e2ad0e236 in Tcl_LsortObjCmd /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclCmdIL.c:3987:17 #2 0x7f6e2ac62876 in TclNRRunCallbacks /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclBasic.c:4493:11 #3 0x7f6e2b30aa56 in Tcl_RecordAndEvalObj /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclHistory.c:190:11 #4 0x7f6e2b4199de in Tcl_MainEx /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/generic/tclMain.c:520:13 #5 0x55cc90bac724 in main /var/tmp/portage/dev-lang/tcl-8.6.11/work/tcl8.6.11/unix/tclAppInit.c:84:5 #6 0x7f6e2a2332f9 in __libc_start_call_main /usr/src/debug/sys-libs/glibc-2.34-r3/glibc-2.34/csu/../sysdeps/nptl/libc_start_call_main.h:58:16 Created attachment 757236 [details]
sanitizer build log
Created attachment 757366 [details]
build.log CFLAGS+="-D_FORTIFY_SOURCE=2" and FEATURES="test"
According to Tcl upstream report (https://core.tcl-lang.org/tcl/info/206e58994f3806ec), this problem is supposedly fixed in Tcl 8.6.12. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35afbb0f209e57fdb2362550c2c0c0469503a5e8 commit 35afbb0f209e57fdb2362550c2c0c0469503a5e8 Author: Alfredo Tupone <tupone@gentoo.org> AuthorDate: 2021-12-11 21:10:37 +0000 Commit: Alfredo Tupone <tupone@gentoo.org> CommitDate: 2021-12-11 21:10:37 +0000 dev-lang/tcl: 8.6.12 bump Fixed version is stable. |