I had a similar problem once many years ago. In that case, I wound up
hacking one of the gobject-introspection tools -- I think it was
g-ir-scanner? -- to not delete the temporary source file and temporary
executable so that I could debug them. I found that the temporary
program calls the _get_type() function of every type. For WebKit's
types, they initialize WebKit, JavaScriptCore, bmalloc, etc. It's very
likely that something is crashing somewhere in the initialization
routines.
My recommended next step is investigate the source code of gobject
introspection and figure out how to stop it from deleting the temporary
files. I was hoping there would be an existing debug option for this,
and I see some references to a "save-temps" (save temporary files)
option in the code, but I don't know how to use it.
I would start investigating here:
https://gitlab.gnome.org/GNOME/gobject-introspection/-/blob/main/giscanner/dumper.py
You're going to want debugging symbols for sure. I hope -g1 works. If
you really can't get debug symbols, then as an absolute last resort I
would start adding print statements in WebKit to try to narrow down
where it's crashing. For that, I would start in WebKit2Initialize.cpp.
Good luck....