x/ref: cgo Errors escape non-utf8 runes
Java in particular is extremely upset by characters like 0xfe.
So much so that it will crash, so we are going to replace such
invalid characters with the Unicode unknown character.
In order to help find out the root cause of these invalid
characters, I have added:
- panic on normal strings if they have an invalid char. This
should never actually happen, so it's worth panicking.
- vlog.Errorf for the error messages and stacks. We escape these
for now, since we know of multiple errors that might lead to an
invalid character in these strings.
1 file changed