runtime error with golang master (furture go 1.22)
LeGEC opened this issue · 0 comments
LeGEC commented
in the golang repository, the stdlib package encoding/base64
received this commit:
The base64.NewEncoding()
function now checks explicitly for duplicate symbols in the alphabet input string.
It turns out that a hacky way to generate names in gen.go
:
genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__")
https://github.com/ugorji/go/blob/master/codec/gen.go#L193
uses a duplicate character (two _
characters at the end).
I don't know if the appropriate fix is to use another custom alphabet or use a base62 alphabet or use the RawStdEncoding and replace the unwanted characters,
but the current code will make any binary compiled with the gotip version fail as soon as started (this base64.NewEncoding()
happens at init()
time)