https://github.com/nikic requested changes to this pull request. Still rejected for previously explained reason. We fundamentally cannot do this. You can use something like `-fsanitize=cfi` to detect this at runtime. https://github.com/llvm/llvm-project/pull/96574