Segfaults on FreeBSD

atmail.dreamhost.com lists at schamschula.com
Sat Jun 19 15:58:17 UTC 2021


Every now and then I try to get MacPorts to build and run on FreeBSD.

Getting it to build requires less than a handful of edits.

However, when running portindex I get a Segfault with a Signal 11.

Here’s what gdb says (after recompiling with debug symbols enabled)"

[marius at mars /opt/local/var/macports/sources/github.com/macports/macports-ports]# portindex
Creating port index in /opt/local/var/macports/sources/github.com/macports/macports-ports
Segmentation fault (core dumped)
[marius at mars /opt/local/var/macports/sources/github.com/macports/macports-ports]# gdb /opt/local/libexec/macports/bin/tclsh8.5 ./tclsh8.5.core
GNU gdb (GDB) 10.2 [GDB v10.2 for FreeBSD]
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/local/libexec/macports/bin/tclsh8.5...
[New LWP 111376]
Core was generated by `/opt/local/libexec/macports/bin/tclsh8.5 /opt/local/bin/portindex'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000080058a25f in strlen () from /lib/libc.so.7
(gdb) where
#0  0x000000080058a25f in strlen () from /lib/libc.so.7
#1  0x0000000800325321 in Tcl_NewStringObj (bytes=0xa51b60 <error: Cannot access memory at address 0xa51b60>, length=-1) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclStringObj.c:267
#2  0x0000000801290041 in MktempCmd (clientData=<optimized out>, interp=0x800a52550, objc=<optimized out>, objv=<optimized out>) at mktemp.c:99
#3  0x00000008002a87e7 in TclEvalObjvInternal (interp=<optimized out>, interp at entry=0x800a52550, objc=<optimized out>, objc at entry=2, objv=objv at entry=0x800a62f70,
    command=0x800ae8db2 "mktemp \"/tmp/mports.portindex.XXXXXXXX\"]\nset fd [open $tempportindex w]\nset save_prefix ${macports::prefix}\n\n# keys for a normal portindex\nforeach key {categories depends_fetch depends_extract depends"..., length=<optimized out>, flags=<optimized out>, flags at entry=0)
    at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclBasic.c:3734
#4  0x00000008002a94c6 in TclEvalEx (interp=<optimized out>, interp at entry=0x800a52550, script=0x800ae8db2 "mktemp \"/tmp/mports.portindex.XXXXXXXX\"]\nset fd [open $tempportindex w]\nset save_prefix ${macports::prefix}\n\n# keys for a normal portindex\nforeach key {categories depends_fetch depends_extract depends"..., numBytes=39, flags=<optimized out>,
    flags at entry=0, line=<optimized out>, line at entry=0, clNextOuter=<optimized out>, outerScript=0x800ae6750 "#!/opt/local/libexec/macports/bin/tclsh8.5\n# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4\n# Traverse through "...)
    at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclBasic.c:4433
#5  0x0000000800317eab in TclSubstTokens (interp=interp at entry=0x800a52550, tokenPtr=tokenPtr at entry=0x800a62998, count=1, tokensLeftPtr=tokensLeftPtr at entry=0x0, line=<optimized out>, clNextOuter=0x8080808080808080,
    outerScript=0x800ae6750 "#!/opt/local/libexec/macports/bin/tclsh8.5\n# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4\n# Traverse through "...) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclParse.c:2320
#6  0x00000008002a9108 in TclEvalEx (interp=<optimized out>, interp at entry=0x800a52550, script=0x800ae6750 "#!/opt/local/libexec/macports/bin/tclsh8.5\n# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4\n# Traverse through "..., numBytes=1493, flags=<optimized out>,
    flags at entry=0, line=<optimized out>, line at entry=1, clNextOuter=<optimized out>, clNextOuter at entry=0x0, outerScript=0x800ae6750 "#!/opt/local/libexec/macports/bin/tclsh8.5\n# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4\n# Traverse through "...)
    at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclBasic.c:4321
#7  0x00000008002a8c5a in Tcl_EvalEx (interp=0xa51b60, interp at entry=0x800a52550, script=0xffffffff <error: Cannot access memory at address 0xffffffff>, numBytes=5903808, flags=10820448, flags at entry=0) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclBasic.c:4090
#8  0x0000000800305b68 in Tcl_FSEvalFileEx (interp=interp at entry=0x800a52550, pathPtr=0x800a5bd30, encodingName=<optimized out>) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclIOUtil.c:1859
#9  0x000000080030b950 in Tcl_Main (argc=<optimized out>, argv=<optimized out>, appInitProc=0x2019c0 <Tcl_AppInit>) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../generic/tclMain.c:443
#10 0x00000000002019b0 in main (argc=10820448, argv=0xffffffff) at /home/marius/Development/MacPorts/MacPorts-2.7.1/vendor/tcl/unix/../unix/tclAppInit.c:85

Marius
__
Marius Schamschula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20210619/4be79cb9/attachment-0001.htm>


More information about the macports-dev mailing list