bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error message: cannot find _struct in shared object


From: Wiley Young
Subject: Error message: cannot find _struct in shared object
Date: Sat, 27 May 2023 09:39:18 -0700

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
uname output: Linux localhost-live 6.2.9-300.fc38.x86_64 #1 SMP
PREEMPT_DYNAMIC Thu Mar 30 22:32:58 UTC 2023 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 5.2
Patch Level: 15
Release Status: release

Description:

A syntax error on a variable assignment lead to $x being unset when `enable
-n "$x" was executed, which produced this error message:
  ./test.sh: line 22: enable: cannot find _struct in shared object :
/usr/bin/bash: undefined symbol: _struct


Repeat-By:

x="${1:='export'}"
./test.sh: line 19: $1: cannot assign in this way
readonly x
+ readonly x
declare -p x
+ declare -p x
declare -r x
enable -n "$x"
+ enable -n ''
./test.sh: line 22: enable: cannot find _struct in shared object :
/usr/bin/bash: undefined symbol: _struct
./test.sh: line 22: enable: : not a shell builtin

[liveuser@localhost-live]$ set -x; declare -p x;
+ set -x
+ declare -p x
bash: declare: x: not found
[liveuser@localhost-live]$ x="${1:='export'}"
bash: $1: cannot assign in this way
[liveuser@localhost-live]$ readonly x
+ readonly x
[liveuser@localhost-live]$ declare -p x
+ declare -p x
declare -r x
[liveuser@localhost-live]$ enable -n "$x"
+ enable -n ''
bash: enable: cannot find _struct in shared object : bash: undefined
symbol: _struct
bash: enable: : not a shell builtin

Cheers,
Wiley


reply via email to

[Prev in Thread] Current Thread [Next in Thread]