$ cat main.c int main (int argc, char *argv[]) { return 0; } $ cat auditor.c #define _GNU_SOURCE #include <link.h> #include <dlfcn.h> unsigned int la_version (unsigned int v) { return LAV_CURRENT; } void la_activity (uintptr_t* cookie, unsigned int flag) { dlmopen(LM_ID_BASE, "/nonexistent.so", RTLD_NOW); } $ gcc -Wall main.c -o main $ gcc -shared -fpic auditor.c -o libauditor.so -ldl $ LD_AUDIT=./libauditor.so ./main Segmentation fault (core dumped)
Fixed on 2.35 (484e672ddabe0a919a692520e6ac8f2580866235).