Open tavianator opened 2 months ago
I haven't seen this one in a while, it's probably because -fportcosmo
is not reading that union right before correctly.
Thanks for posting a minimal example! Does it work if you use earlier versions of Cosmopolitan Libc and cosmocc
, say from https://github.com/jart/cosmopolitan/releases/tag/3.2.4 (I don't expect it to, but if it does then that means the error is from a different spot).
Updated the gcc build to handle this case.
I ran the below script for cosmocc
to compile the example file without crashing.
cat > foo.c <<EOF
#include <signal.h>
static struct sigaction action = {
.sa_sigaction = 0,
.sa_flags = SA_RESTART | SA_SIGINFO,
};
int main() {
return 0;
}
EOF
wget https://github.com/jart/cosmopolitan/releases/download/3.3.6/cosmocc-3.3.6.zip
unzip cosmocc-3.3.6.zip
wget https://github.com/ahgamut/superconfigure/releases/download/z0.0.40/aarch64-gcc.zip
unzip -o aarch64-gcc.zip
wget https://github.com/ahgamut/superconfigure/releases/download/z0.0.40/x86_64-gcc.zip
unzip -o x86_64-gcc.zip
./bin/cosmocc foo.c -o foo.com
./foo.com
@jart after confirming the build works, we can close the issue when releasing a new cosmocc
.
With cosmocc-3.3.6: