You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I compiled oksh using the Zig CC compiler (clang wrapper with cross-compilation support and ubsan) once with the --no-thanks flag and once without. The binary compiled with --no-thanks causes an "Illegal instruction" error when attempting to compile other programs, meaning that undefined behavior was detected.
Here's an example:
mkdir -p /tmp/test &&cd /tmp/test
wget https://github.com/ibara/oksh/releases/download/oksh-7.3/oksh-7.3.tar.gz
wget https://invisible-island.net/archives/byacc/byacc-20230521.tgz
# compile oksh with `--no-thanks` using zig cc
tar xf oksh-7.3.tar.gz &&cd oksh-7.3
CC="zig cc -target x86_64-linux-musl" ./configure --no-thanks
make
# configure byacc using oksh as shellcd /tmp/test
tar xf byacc-20230521.tgz &&cd byacc-20230521
sed -i -e 's_/bin/sh_/tmp/test/oksh-7.3/oksh_' configure
./configure --help # Illegal instruction
The text was updated successfully, but these errors were encountered:
I compiled
oksh
using the Zig CC compiler (clang wrapper with cross-compilation support and ubsan) once with the--no-thanks
flag and once without. The binary compiled with--no-thanks
causes an "Illegal instruction" error when attempting to compile other programs, meaning that undefined behavior was detected.Here's an example:
The text was updated successfully, but these errors were encountered: