Segmentation fault when running glibc programs on arm
Executing a glibc program with gcompat
under Alpine crashes (Segmentation fault
) on arm.
I'm using a Raspberry Pi 4B, running the Raspberry Pi OS Lite (32bits).
Here are the steps to reproduce:
- Compile a hello world program:
gcc /tmp/hello.c -o /tmp/hello
Content of /tmp/hello.c
is:
#include <stdio.h>
int main()
{
printf("Hello!\n");
return 0;
}
- Create and login to an Alpine (edge) Docker container:
docker run --rm -ti -v /tmp/hello:/hello --privileged alpine:edge sh
- Install
gcompat
:
apk add gcompat
- Run the hello world program. At this point, the program crashes:
/ # /hello
Segmentation fault (core dumped)