Encoding mismatches result in runtime crashes in customer code compiled to Go #2934
Labels
kind: bug
Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label
lang: golang
Dafny's transpiler to Go and its runtime
Input:
Output, with go:
What leads to the issue:
escaped
is represented as 6 C# "chars", andunescaped
as one C# char (UCS2)escaped
string has a different meaning in Go, and theunescaped
string ends up written as two bytes in the target file (utf-8)unescaped
the final byte sequence is the UTF-8 one (length = 2)#2926 currently fixes the issue with
unescaped
, but not withescaped
.The text was updated successfully, but these errors were encountered: