Dear Maintainer,
I tried to reproduce this segfault.
Unfortunately this did not work as expected.
The segfault in multi-thread did not show up.
But I received one in multi-dict (in e.g. 3 of 6 runs).

This was done in a up-to-date unstable amd64 VM,
running at a AMD cpu, 16 threads given to the VM.

The segfault did manifest in each case in libhunspell.
This seems to be caused by the static variable "utf_tbl"
possibly being shared between threads, and being freed and
initialized while maybe used in another thread.

Kind regards,
Bernhard


(gdb) bt
#0  0x00007f56b5b3159b in unicodetolower(unsigned short, int) () from 
/lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#1  0x00007f56b5b317ae in get_captype_utf8(std::vector<w_char, std::allocator<w_char> 
> const&, int) () from /lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#2  0x00007f56b5b385bc in ?? () from /lib/x86_64-linux-gnu/libhunspell-1.7.so.0
...
(gdb) bt
#0  0x00007f56b5b3159b in unicodetolower (c=c@entry=116, 
langnum=langnum@entry=0) at ./src/hunspell/csutil.cxx:2482
#1  0x00007f56b5b317ae in get_captype_utf8 (word=std::vector of length 6, 
capacity 64 = {...}, langnum=0) at ./src/hunspell/csutil.cxx:2538
#2  0x00007f56b5b385bc in HashMgr::get_clen_and_captype (workbuf=std::vector of length 6, 
capacity 64 = {...}, captype=<synthetic pointer>, word="tenant", 
this=0x7f568eb64d90) at ./src/hunspell/hashmgr.cxx:468
#3  HashMgr::get_clen_and_captype (workbuf=..., captype=<synthetic pointer>, 
word=..., this=0x7f568eb64d90) at ./src/hunspell/hashmgr.cxx:464
#4  HashMgr::load_tables (this=0x7f568eb64d90, tpath=<optimized out>, 
key=<optimized out>) at ./src/hunspell/hashmgr.cxx:690
#5  0x00007f56b5b38dfc in HashMgr::HashMgr (this=this@entry=0x7f568eb64d90, 
tpath=tpath@entry=0x7f56adffa800 "/usr/share/hunspell/en_US.dic", 
apath=apath@entry=0x7f56adffa400 "/usr/share/hunspell/en_US.aff", key=key@entry=0x0) at 
./src/hunspell/hashmgr.cxx:101
#6  0x00007f56b5b43616 in HunspellImpl::HunspellImpl (this=0x7f568fb8c850, affpath=0x7f56adffa400 
"/usr/share/hunspell/en_US.aff", dpath=0x7f56adffa800 
"/usr/share/hunspell/en_US.dic", key=0x0) at ./src/hunspell/hunspell.cxx:179
#7  0x00007f56b5b43a27 in Hunspell_create (affpath=affpath@entry=0x7f56adffa400 
"/usr/share/hunspell/en_US.aff", dpath=dpath@entry=0x7f56adffa800 
"/usr/share/hunspell/en_US.dic") at ./src/hunspell/hunspell.cxx:2164
#8  0x00007f56b60decc1 in spellcheck_create (lang=0x7f568d0e22c0 "en") at 
tokenize/spellcheck-hun.c:101
#9  0x00007f56b60af6e5 in dictionary_six_str (lang=lang@entry=0x560b8f8ac37a "en", input=input@entry=0x7f568f9bc460 "\n %", '*' <repeats 75 times>, 
"%\n %", ' ' <repeats 75 times>, "%\n %       Copyright (C) 1991-1998  Daniel "..., dict_name=dict_name@entry=0x7f568fa3e630 "en/4.0.dict", 
pp_name=pp_name@entry=0x7f568fa3e6f0 "en/4.0.knowledge", cons_name=cons_name@entry=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", 
affix_name=affix_name@entry=0x7f568fa3e930 "en/4.0.affix", regex_name=0x7f568fa3e070 "en/4.0.regex") at dict-file/dictionary.c:159
#10 0x00007f56b60afc28 in dictionary_six (regex_name=0x7f568fa3e070 "en/4.0.regex", affix_name=0x7f568fa3e930 
"en/4.0.affix", cons_name=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", pp_name=0x7f568fa3e6f0 
"en/4.0.knowledge", dict_name=0x7f568fa3e630 "en/4.0.dict", lang=0x560b8f8ac37a "en") at 
dict-file/dictionary.c:281
#11 dictionary_create_from_file (lang=0x560b8f8ac37a "en") at 
dict-file/dictionary.c:307
#12 0x0000560b8f8ab598 in parse_one_sent (sent_str=0x560b8f8ac248 "The line extends 
10 miles offshore.") at ./tests/multi-dict.cc:28
#13 parse_sents (thread_id=<optimized out>, niter=30) at 
./tests/multi-dict.cc:82
#14 0x00007f56b5ed44a3 in std::execute_native_thread_routine 
(__p=0x560b90a39a70) at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:82
#15 0x00007f56b5ca7fd4 in start_thread (arg=<optimized out>) at 
./nptl/pthread_create.c:442
#16 0x00007f56b5d2866c in clone3 () at 
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

2482      return (utf_tbl) ? utf_tbl[c].clower : c;

=> 0x7f56b5b3159b <_Z14unicodetolowerti+27>:    movzwl 0x4(%rdx,%rax,2),%eax
(gdb) print/x $rdx
$49 = 0x7f56ac614010
(gdb) print/x $rax
$50 = 0x15c
(gdb) x/1xg ($rdx + $rax * 2) + 0x4
0x7f56ac6142cc: Cannot access memory at address 0x7f56ac6142cc
(gdb) print utf_tbl
$51 = (unicode_info2 *) 0x0
# Unstable amd64 qemu VM 2023-01-20

apt update
apt dist-upgrade

apt install systemd-coredump mc gdb valgrind rr autopkgtest dpkg-dev 
libhunspell-1.7-0-dbgsym libstdc++6-dbgsym
apt build-dep link-grammar

autopkgtest --shell-fail link-grammar -- null



PASS: mem-leak
PASS: multi-java
PASS: dict-reopen
../test-driver: Zeile 112: 12435 Speicherzugriffsfehler  (Speicherabzug 
geschrieben) "$@" >> "$log_file" 2>&1
FAIL: multi-dict
PASS: multi-thread
===============================================
   link-grammar 5.12.0: tests/test-suite.log
===============================================

# TOTAL: 5
# PASS:  4
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: multi-dict







[  348.182545] multi-dict[12511]: segfault at 7f56ac6142cc ip 00007f56b5b3159b 
sp 00007f56adffa188 error 4 in libhunspell-1.7.so.0.0.1[7f56b5b14000+44000] 
likely on CPU 7 (core 7, socket 0)
[  348.182565] Code: 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 66 83 ff 49 
74 22 48 8b 15 03 35 05 00 89 f8 48 85 d2 74 0c 0f b7 ff 48 8d 04 7f <0f> b7 44 
42 04 c3 0f 1f 80 00 00 00 00 83 ee 5a 83 fe 0c 77 d6 ba

# coredumpctl list
TIME                          PID  UID  GID SIG     COREFILE EXE                
                                            SIZE
Fri 2023-01-20 15:50:00 CET 12435 1000 1000 SIGSEGV present  
/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict 133.0M


# coredumpctl gdb
           PID: 12435 (multi-dict)
           UID: 1000 (benutzer)
           GID: 1000 (benutzer)
        Signal: 11 (SEGV)
     Timestamp: Fri 2023-01-20 15:49:51 CET (1min 45s ago)
  Command Line: /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
    Executable: /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (benutzer)
       Boot ID: 5a6c055e6f25428aa3a9e99ac4d2b6fc
    Machine ID: 55a5ad9df1d547f38d7696343d9fde7d
      Hostname: debian
       Storage: 
/var/lib/systemd/coredump/core.multi-dict.1000.5a6c055e6f25428aa3a9e99ac4d2b6fc.12435.1674226191000000.zst
 (present)
  Size on Disk: 133.0M
       Message: Process 12435 (multi-dict) of user 1000 dumped core.
                
                Stack trace of thread 12511:
                #0  0x00007f56b5b3159b _Z14unicodetolowerti 
(libhunspell-1.7.so.0 + 0x2359b)
                #1  0x00007f56b5b317ae 
_Z16get_captype_utf8RKSt6vectorI6w_charSaIS0_EEi (libhunspell-1.7.so.0 + 
0x237ae)
                #2  0x00007f56b5b385bc n/a (libhunspell-1.7.so.0 + 0x2a5bc)
                #3  0x00007f56b5b38dfc n/a (libhunspell-1.7.so.0 + 0x2adfc)
                #4  0x00007f56b5b43616 n/a (libhunspell-1.7.so.0 + 0x35616)
                #5  0x00007f56b5b43a27 Hunspell_create (libhunspell-1.7.so.0 + 
0x35a27)
                #6  0x00007f56b60decc1 n/a 
(/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs/liblink-grammar.so.5.12.0
 + 0x45cc1)
                #7  0x70736e75682f6572 n/a (n/a + 0x0)
                ELF object binary architecture: AMD x86-64

...
Core was generated by 
`/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f56b5b3159b in unicodetolower(unsigned short, int) () from 
/lib/x86_64-linux-gnu/libhunspell-1.7.so.0
[Current thread is 1 (Thread 0x7f56adffb6c0 (LWP 12511))]
(gdb) set width 0
(gdb) set pagination off
(gdb) bt
#0  0x00007f56b5b3159b in unicodetolower(unsigned short, int) () from 
/lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#1  0x00007f56b5b317ae in get_captype_utf8(std::vector<w_char, 
std::allocator<w_char> > const&, int) () from 
/lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#2  0x00007f56b5b385bc in ?? () from /lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#3  0x00007f56b5b38dfc in ?? () from /lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#4  0x00007f56b5b43616 in ?? () from /lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#5  0x00007f56b5b43a27 in Hunspell_create () from 
/lib/x86_64-linux-gnu/libhunspell-1.7.so.0
#6  0x00007f56b60decc1 in spellcheck_create (lang=0x7f568d0e22c0 "en") at 
tokenize/spellcheck-hun.c:101
#7  0x00007f56b60af6e5 in dictionary_six_str (lang=lang@entry=0x560b8f8ac37a 
"en", input=input@entry=0x7f568f9bc460 "\n %", '*' <repeats 75 times>, "%\n %", 
' ' <repeats 75 times>, "%\n %       Copyright (C) 1991-1998  Daniel "..., 
dict_name=dict_name@entry=0x7f568fa3e630 "en/4.0.dict", 
pp_name=pp_name@entry=0x7f568fa3e6f0 "en/4.0.knowledge", 
cons_name=cons_name@entry=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", 
affix_name=affix_name@entry=0x7f568fa3e930 "en/4.0.affix", 
regex_name=0x7f568fa3e070 "en/4.0.regex") at dict-file/dictionary.c:159
#8  0x00007f56b60afc28 in dictionary_six (regex_name=0x7f568fa3e070 
"en/4.0.regex", affix_name=0x7f568fa3e930 "en/4.0.affix", 
cons_name=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", pp_name=0x7f568fa3e6f0 
"en/4.0.knowledge", dict_name=0x7f568fa3e630 "en/4.0.dict", lang=0x560b8f8ac37a 
"en") at dict-file/dictionary.c:281
#9  dictionary_create_from_file (lang=0x560b8f8ac37a "en") at 
dict-file/dictionary.c:307
#10 0x0000560b8f8ab598 in parse_one_sent (sent_str=0x560b8f8ac248 "The line 
extends 10 miles offshore.") at ./tests/multi-dict.cc:28
#11 parse_sents (thread_id=<optimized out>, niter=30) at 
./tests/multi-dict.cc:82
#12 0x00007f56b5ed44a3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007f56b5ca7fd4 in start_thread (arg=<optimized out>) at 
./nptl/pthread_create.c:442
#14 0x00007f56b5d2866c in clone3 () at 
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) bt
#0  0x00007f56b5b3159b in unicodetolower (c=c@entry=116, 
langnum=langnum@entry=0) at ./src/hunspell/csutil.cxx:2482
#1  0x00007f56b5b317ae in get_captype_utf8 (word=std::vector of length 6, 
capacity 64 = {...}, langnum=0) at ./src/hunspell/csutil.cxx:2538
#2  0x00007f56b5b385bc in HashMgr::get_clen_and_captype (workbuf=std::vector of 
length 6, capacity 64 = {...}, captype=<synthetic pointer>, word="tenant", 
this=0x7f568eb64d90) at ./src/hunspell/hashmgr.cxx:468
#3  HashMgr::get_clen_and_captype (workbuf=..., captype=<synthetic pointer>, 
word=..., this=0x7f568eb64d90) at ./src/hunspell/hashmgr.cxx:464
#4  HashMgr::load_tables (this=0x7f568eb64d90, tpath=<optimized out>, 
key=<optimized out>) at ./src/hunspell/hashmgr.cxx:690
#5  0x00007f56b5b38dfc in HashMgr::HashMgr (this=this@entry=0x7f568eb64d90, 
tpath=tpath@entry=0x7f56adffa800 "/usr/share/hunspell/en_US.dic", 
apath=apath@entry=0x7f56adffa400 "/usr/share/hunspell/en_US.aff", 
key=key@entry=0x0) at ./src/hunspell/hashmgr.cxx:101
#6  0x00007f56b5b43616 in HunspellImpl::HunspellImpl (this=0x7f568fb8c850, 
affpath=0x7f56adffa400 "/usr/share/hunspell/en_US.aff", dpath=0x7f56adffa800 
"/usr/share/hunspell/en_US.dic", key=0x0) at ./src/hunspell/hunspell.cxx:179
#7  0x00007f56b5b43a27 in Hunspell_create (affpath=affpath@entry=0x7f56adffa400 
"/usr/share/hunspell/en_US.aff", dpath=dpath@entry=0x7f56adffa800 
"/usr/share/hunspell/en_US.dic") at ./src/hunspell/hunspell.cxx:2164
#8  0x00007f56b60decc1 in spellcheck_create (lang=0x7f568d0e22c0 "en") at 
tokenize/spellcheck-hun.c:101
#9  0x00007f56b60af6e5 in dictionary_six_str (lang=lang@entry=0x560b8f8ac37a 
"en", input=input@entry=0x7f568f9bc460 "\n %", '*' <repeats 75 times>, "%\n %", 
' ' <repeats 75 times>, "%\n %       Copyright (C) 1991-1998  Daniel "..., 
dict_name=dict_name@entry=0x7f568fa3e630 "en/4.0.dict", 
pp_name=pp_name@entry=0x7f568fa3e6f0 "en/4.0.knowledge", 
cons_name=cons_name@entry=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", 
affix_name=affix_name@entry=0x7f568fa3e930 "en/4.0.affix", 
regex_name=0x7f568fa3e070 "en/4.0.regex") at dict-file/dictionary.c:159
#10 0x00007f56b60afc28 in dictionary_six (regex_name=0x7f568fa3e070 
"en/4.0.regex", affix_name=0x7f568fa3e930 "en/4.0.affix", 
cons_name=0x7f568fa3e8e0 "en/4.0.constituent-knowledge", pp_name=0x7f568fa3e6f0 
"en/4.0.knowledge", dict_name=0x7f568fa3e630 "en/4.0.dict", lang=0x560b8f8ac37a 
"en") at dict-file/dictionary.c:281
#11 dictionary_create_from_file (lang=0x560b8f8ac37a "en") at 
dict-file/dictionary.c:307
#12 0x0000560b8f8ab598 in parse_one_sent (sent_str=0x560b8f8ac248 "The line 
extends 10 miles offshore.") at ./tests/multi-dict.cc:28
#13 parse_sents (thread_id=<optimized out>, niter=30) at 
./tests/multi-dict.cc:82
#14 0x00007f56b5ed44a3 in std::execute_native_thread_routine 
(__p=0x560b90a39a70) at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:82
#15 0x00007f56b5ca7fd4 in start_thread (arg=<optimized out>) at 
./nptl/pthread_create.c:442
#16 0x00007f56b5d2866c in clone3 () at 
../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb)

(gdb) print *environ@100
$42 = {0x7ffe9277ab02 "SHELL=/bin/bash", 0x7ffe9277ab12 
"DEB_HOST_ARCH_LIBC=gnu", 0x7ffe9277ab29 "DEB_TARGET_GNU_SYSTEM=linux-gnu", 
0x7ffe9277ab49 "GCJFLAGS=-g -O2 
-ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong", 0x7ffe9277abac 
"DEB_HOST_MULTIARCH=x86_64-linux-gnu", 0x7ffe9277abd0 
"MAKE_TERMOUT=/dev/pts/1", 0x7ffe9277abe8 "DEB_TARGET_ARCH_CPU=amd64", 
0x7ffe9277ac02 "DH_INTERNAL_OVERRIDE=dh_auto_test", 0x7ffe9277ac24 
"TEST_LOGS=dict-reopen.log multi-dict.log multi-thread.log mem-leak.log 
multi-java.log", 0x7ffe9277ac7a "DEB_TARGET_ARCH_BITS=64", 0x7ffe9277ac92 
"FFLAGS=-g -O2 -ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong", 0x7ffe9277acf3 "DEB_CFLAGS_MAINT_APPEND=-O3", 
0x7ffe9277ad0f "PWD=/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests", 
0x7ffe9277ad3f "DEB_BUILD_MULTIARCH=x86_64-linux-gnu", 0x7ffe9277ad64 
"SOURCE_DATE_EPOCH=1673086564", 0x7ffe9277ad81 "LOGNAME=benutzer", 
0x7ffe9277ad92 "AUTOPKGTEST_VIRT_COPY_TIMEOUT=300", 0x7ffe9277adb4 
"XDG_SESSION_TYPE=tty", 0x7ffe9277adc9 "DEB_CXXFLAGS_MAINT_APPEND=-O3", 
0x7ffe9277ade7 "DEB_HOST_GNU_SYSTEM=linux-gnu", 0x7ffe9277ae05 
"DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed", 0x7ffe9277ae2e 
"DEB_RULES_REQUIRES_ROOT=no", 0x7ffe9277ae49 "DEB_BUILD_ARCH_BITS=64", 
0x7ffe9277ae60 "MAKEOVERRIDES=${-*-command-variables-*-}", 0x7ffe9277ae89 
"CXXFLAGS=-D_DEFAULT_SOURCE -std=c++17 -fvisibility=hidden -g 
-ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong -Wformat -Werror=format-security -O3 -Wall 
-std=c++11", 0x7ffe9277af4f "DEB_BUILD_ARCH_OS=linux", 0x7ffe9277af67 
"MOTD_SHOWN=pam", 0x7ffe9277af76 "LDFLAGS=-Wl,-z,relro -Wl,-z,now 
-Wl,--as-needed ", 0x7ffe9277afa7 
"HOME=/tmp/autopkgtest.j0Ob0B/build.B3e/src/debian/.debhelper/generated/_source/home",
 0x7ffe9277affb "LANG=de_DE.UTF-8", 0x7ffe9277b00c "DEB_HOST_ARCH_ABI=base", 
0x7ffe9277b023 
"LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01"...,
 0x7ffe9277b707 "srcdir=.", 0x7ffe9277b710 "DEB_TARGET_ARCH_LIBC=gnu", 
0x7ffe9277b729 "DEB_TARGET_GNU_TYPE=x86_64-linux-gnu", 0x7ffe9277b74e 
"DEB_TARGET_ARCH_ABI=base", 0x7ffe9277b767 "CPPFLAGS=-Wdate-time 
-D_FORTIFY_SOURCE=2", 0x7ffe9277b790 "SSH_CONNECTION=10.0.2.2 36814 10.0.2.15 
22", 0x7ffe9277b7bb "DEB_TARGET_ARCH=amd64", 0x7ffe9277b7d1 
"DEB_BUILD_ARCH=amd64", 0x7ffe9277b7e6 "DEB_TARGET_ARCH_OS=linux", 
0x7ffe9277b7ff "MFLAGS=-w -j16 --jobserver-auth=4,5", 0x7ffe9277b823 
"FCFLAGS=-g -O2 -ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong", 0x7ffe9277b885 "XDG_SESSION_CLASS=user", 
0x7ffe9277b89c "MAKEFLAGS=w -j16 --jobserver-auth=4,5 -- 
TEST_LOGS=dict-reopen.log\\ multi-dict.log\\ multi-thread.log\\ mem-leak.log\\ 
multi-java.log TESTSUITEFLAGS=-j16\\ --verbose VERBOSE=1", 0x7ffe9277b948 
"BIN_SH=xpg4", 0x7ffe9277b954 "TERM=xterm-256color", 0x7ffe9277b968 
"DEB_TARGET_MULTIARCH=x86_64-linux-gnu", 0x7ffe9277b98e 
"DEB_BUILD_ARCH_CPU=amd64", 0x7ffe9277b9a7 "DEB_BUILD_ARCH_LIBC=gnu", 
0x7ffe9277b9bf "OBJCFLAGS=-g -O2 
-ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong -Wformat -Werror=format-security", 0x7ffe9277ba44 
"USER=benutzer", 0x7ffe9277ba52 "MAKE_TERMERR=/dev/pts/1", 0x7ffe9277ba6a 
"DEB_HOST_ARCH_BITS=64", 0x7ffe9277ba80 "DEB_BUILD_GNU_TYPE=x86_64-linux-gnu", 
0x7ffe9277baa4 "DEB_BUILD_OPTIONS=parallel=16 ", 0x7ffe9277bac3 "SHLVL=3", 
0x7ffe9277bacb "MAKELEVEL=6", 0x7ffe9277bad7 "DEB_BUILD_GNU_SYSTEM=linux-gnu", 
0x7ffe9277baf6 "DH_INTERNAL_OPTIONS=", 0x7ffe9277bb0b "XDG_SESSION_ID=3", 
0x7ffe9277bb1c "DEB_BUILD_MAINT_OPTIONS=hardening=+all", 0x7ffe9277bb43 
"DEB_TARGET_GNU_CPU=x86_64", 0x7ffe9277bb5d "DEB_TARGET_ARCH_ENDIAN=little", 
0x7ffe9277bb7b "DEB_HOST_ARCH=amd64", 0x7ffe9277bb8f "DUALCASE=1", 
0x7ffe9277bb9a 
"LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs", 
0x7ffe9277bbe3 "DEB_HOST_ARCH_ENDIAN=little", 0x7ffe9277bbff 
"XDG_RUNTIME_DIR=/tmp/dh-xdg-rundir-hUS2q_wH", 0x7ffe9277bc2b 
"SSH_CLIENT=10.0.2.2 36814 22", 0x7ffe9277bc48 "DEB_CXXFLAGS_MAINT_STRIP=-O2", 
0x7ffe9277bc65 "DEB_HOST_GNU_TYPE=x86_64-linux-gnu", 0x7ffe9277bc88 
"PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games", 0x7ffe9277bcc6 
"DEB_BUILD_ARCH_ENDIAN=little", 0x7ffe9277bce3 "DEB_HOST_ARCH_CPU=amd64", 
0x7ffe9277bcfb "TESTSUITEFLAGS=-j16 --verbose", 0x7ffe9277bd19 
"CFLAGS=-D_DEFAULT_SOURCE -std=c11 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE 
-D_ISOC11_SOURCE -fvisibility=hidden -g 
-ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong "..., 0x7ffe9277be06 
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus", 0x7ffe9277be3c 
"OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/tmp/autopkgtest.j0Ob0B/build.B3e/src=. 
-fstack-protector-strong -Wformat -Werror=format-security", 0x7ffe9277bec3 
"SSH_TTY=/dev/pts/1", 0x7ffe9277bed6 "DFLAGS=-frelease", 0x7ffe9277bee7 
"DEB_HOST_GNU_CPU=x86_64", 0x7ffe9277beff "DEB_HOST_ARCH_OS=linux", 
0x7ffe9277bf16 "DEB_BUILD_GNU_CPU=x86_64", 0x7ffe9277bf2f 
"DEB_BUILD_ARCH_ABI=base", 0x7ffe9277bf47 "DEB_CFLAGS_MAINT_STRIP=-O2", 
0x7ffe9277bf62 "DH_INTERNAL_BUILDFLAGS=1", 0x7ffe9277bf7b 
"OLDPWD=/tmp/autopkgtest.j0Ob0B/build.B3e/src", 0x7ffe9277bfa8 "VERBOSE=1", 
0x7ffe9277bfb2 "ASFLAGS=", 0x0
-- PWD and LD_LIBRARY_PATH



2482      return (utf_tbl) ? utf_tbl[c].clower : c;

=> 0x7f56b5b3159b <_Z14unicodetolowerti+27>:    movzwl 0x4(%rdx,%rax,2),%eax
(gdb) print/x $rdx
$49 = 0x7f56ac614010
(gdb) print/x $rax
$50 = 0x15c
(gdb) x/1xg ($rdx + $rax * 2) + 0x4
0x7f56ac6142cc: Cannot access memory at address 0x7f56ac6142cc
(gdb) print utf_tbl
$51 = (unicode_info2 *) 0x0




# At the "autopkgtest --shell-fail" prompt:

benutzer@debian:/$ cd /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 
LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs 
valgrind /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
...
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
Speicherzugriffsfehler (Speicherabzug geschrieben)
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$



benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 
LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs 
valgrind /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
==12960== Memcheck, a memory error detector
==12960== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==12960== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==12960== Command: /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
==12960== 
Creating 10 threads, each parsing 30 sentences
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
...
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
Done with multi-threaded parsing
==12960== 
==12960== HEAP SUMMARY:
==12960==     in use at exit: 366,182,656 bytes in 17,881 blocks
==12960==   total heap usage: 77,177,718 allocs, 77,159,837 frees, 
11,081,345,749 bytes allocated
==12960== 
==12960== LEAK SUMMARY:
==12960==    definitely lost: 354,324,480 bytes in 17,301 blocks
==12960==    indirectly lost: 11,653,120 bytes in 569 blocks
==12960==      possibly lost: 204,800 bytes in 10 blocks
==12960==    still reachable: 256 bytes in 1 blocks
==12960==         suppressed: 0 bytes in 0 blocks
==12960== Rerun with --leak-check=full to see details of leaked memory
==12960== 
==12960== For lists of detected and suppressed errors, rerun with: -s
==12960== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$






benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 
LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs rr 
record  /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
rr: Saving execution to trace directory 
`/home/benutzer/.local/share/rr/multi-dict-0'.
Creating 10 threads, each parsing 30 sentences
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
...
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
Done with multi-threaded parsing
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 



benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 
LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs rr 
record --chaos /tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-dict
rr: Saving execution to trace directory 
`/home/benutzer/.local/share/rr/multi-dict-1'.
Creating 10 threads, each parsing 30 sentences
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
...
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
link-grammar: Info: Dictionary found at ../data/en/4.0.dict
Done with multi-threaded parsing
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ 




benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ export 
LD_LIBRARY_PATH=/tmp/autopkgtest.j0Ob0B/build.B3e/src/link-grammar/.libs
benutzer@debian:/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests$ while true; do 
/tmp/autopkgtest.j0Ob0B/build.B3e/src/tests/.libs/multi-thread; done
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences
Done with multi-threaded parsing (stat: 2250 full parses)
Creating 10 threads, each parsing 500 sentences

Reply via email to