If you run in a browser debugger, you can get a stack trace of where it errors (by doing "pause on exceptions"). In that trace you can see the call, and the signature used there. Building with -gsource-map, you will get the source location of the error which is usually most convenient.
Seeing the signature of the called function is harder, but usually you can see the index in the table that is called, and look at the item at that index, as the table is normally filled once and then immutable (except in dynamic linking and other situations). For this it is helpful to look at the wasm itself, not the source code, so building *without* source maps, then pausing on the exception, is helpful.
I do agree it would be nice if the error were clearer without a debugger, though. I actually see that UBSan reports something here in native builds but not wasm, and filed a bug for it:
- Alon