Bug 245746 - lang/gnu-apl: crash on startup on 11.3-STABLE #0 r356413 amd64
Summary: lang/gnu-apl: crash on startup on 11.3-STABLE #0 r356413 amd64
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-19 21:10 UTC by Marcin Cieślak
Modified: 2020-04-20 06:46 UTC (History)
1 user (show)

See Also:
linimon: maintainer-feedback? (danfe)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2020-04-19 21:10:25 UTC
I vaguely remember running GNU APL on this machine earlier, but both the package and self-compiler port crashes on startup:

> gdb831 /usr/local/bin/apl
GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD]
Copyright (C) 2019 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-freebsd11.3".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 /usr/local/bin/apl...
(gdb) run
Starting program: /usr/local/bin/apl 

Program received signal SIGSEGV, Segmentation fault.
0x0000000000409747 in std::__1::endl<char, std::__1::char_traits<char> > (__os=...) at /usr/include/c++/v1/ostream:1002
1002	    __os.put(__os.widen('\n'));
(gdb) bt
#0  0x0000000000409747 in std::__1::endl<char, std::__1::char_traits<char> > (__os=...) at /usr/include/c++/v1/ostream:1002
#1  0x0000000000409727 in std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<< (this=0x8d5300 <CERR>, 
    __pf=0x409730 <std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)>)
    at /usr/include/c++/v1/ostream:196
#2  0x0000000000421247 in do_Assert (cond=0x6050c3 "get_ValueType() == TV_FUN", fun=0x604d3a "Token", file=0x604e22 "./Token.hh", 
    line=76) at Assert.cc:46
#3  0x000000000041b5eb in Token::Token (this=0x7fffffffc980, tg=0, fun=0x8d5f38 <Quad_CR::_fun>) at ./Token.hh:76
#4  0x0000000000491f59 in Function::get_token (this=0x8d5f38 <Quad_CR::_fun>) at ./Function.hh:163
#5  0x00000000005fae4a in Workspace::get_quad (ucs=..., len=@0x7fffffffc8ec: 3) at Workspace.cc:348
#6  0x00000000005c2f5b in Tokenizer::tokenize_quad (this=0x7fffffffd198, src=..., tos=...) at Tokenizer.cc:452
#7  0x00000000005c1c82 in Tokenizer::do_tokenize (this=0x7fffffffd198, input=..., tos=...) at Tokenizer.cc:142
#8  0x00000000005c12df in Tokenizer::tokenize (this=0x7fffffffd198, input=..., tos=...) at Tokenizer.cc:59
#9  0x00000000004c9fa4 in Parser::parse (this=0x7fffffffd260, input=..., tos=...) at Parser.cc:50
#10 0x000000000048e10f in Executable::parse_body_line (this=0x95b8f8 <Macro::Z__LO_RANK_X5_B+48>, line=3, ucs_line=..., trace=false, 
    tolerant=false, loc=0x617000 "Macro.cc:30", macro=true) at Executable.cc:144
#11 0x00000000005d1f7c in UserFunction::parse_body (this=0x95b8c8 <Macro::Z__LO_RANK_X5_B>, loc=0x617000 "Macro.cc:30", 
    tolerant=false, macro=true) at UserFunction.cc:892
#12 0x00000000005d1749 in UserFunction::UserFunction (this=0x95b8c8 <Macro::Z__LO_RANK_X5_B>, txt=..., loc=0x617000 "Macro.cc:30", 
    _creator=..., tolerant=false, macro=true) at UserFunction.cc:82
#13 0x00000000004bf13e in Macro::Macro (this=0x95b8c8 <Macro::Z__LO_RANK_X5_B>, num=Macro::MAC_Z__LO_RANK_X5_B, 
    text=0x6549a5 "Z←(LO Z__LO_RANK_X5_B) [X5] B;LB;rho_B;N_max;N;LZ;rho_Z\n (X5 LB rho_B LZ rho_Z)←X5 ◊ B←(LZ,LB)⍴B ◊ N_max←LZ+N←⎕IO ◊ Z←LZ⍴0\nLOOP: Z[N]←⊂LO rho_B⍴B[N;] ◊ →(N_max>N←N+"...) at Macro.cc:30
#14 0x0000000000601926 in __cxx_global_var_init.69(void) () at ./Macro.def:187
#15 0x0000000000601c49 in _GLOBAL__sub_I_static_Objects.cc () at ./Workspace.hh:52
#16 0x0000000000602212 in __do_global_ctors_aux ()
#17 0x0000000000406c3e in _init ()
#18 0x00007fffffffdcc0 in ?? ()
#19 0x00000008008cb9ac in objlist_call_init (list=<optimized out>, lockstate=<optimized out>)
    at /usr/src/libexec/rtld-elf/rtld.c:2697
#20 0x00000008008ca902 in _rtld (sp=<optimized out>, exit_proc=0x7fffffffe760, objp=0x7fffffffe768)
    at /usr/src/libexec/rtld-elf/rtld.c:769
#21 0x00000008008c8709 in rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:39
#22 0x0000000000000000 in ?? ()
(gdb)
Comment 1 Marcin Cieślak 2020-04-19 21:11:50 UTC
This is 

gnu-apl-1.8_2

package, also built from ports:

> (cd /usr/ports/lang/gnu-apl && make showconfig)
===> The following configuration options are available for gnu-apl-1.8_2:
     DOCS=on: Build and/or install documentation
     GTK3=off: GTK+ 3 GUI toolkit support
     LIBAPL=off: Build libapl.so instead of executable
     PCRE=off: Use Perl Compatible Regular Expressions
     PGSQL=off: PostgreSQL database support
     SQLITE=off: SQLite database support
===> Use 'make config' to modify these settings
Comment 2 Alexey Dokuchaev freebsd_committer 2020-04-20 06:46:59 UTC
Comparing the backtraces, looks like you're hitting the same bug as reported on OpenBSD earlier:

  https://lists.gnu.org/archive/html/bug-apl/2019-07/msg00018.html

TL,DR: apply upstream SVN 1180, rebuild, and see if it solves the problem.  In the mean time, I'll try to reproduce it myself.