Unicode/utf8: panic

I have the same issue as described here: unicode/utf8: invalid memory address or nil pointer dereference · Issue #50346 · golang/go · GitHub

The original thread is locked. The first commenter referenced this forum here, so I’d like to give it a go as well. ValidString has moved lines since, but I think this is the same part of code as that is where my panic is happening here. How is it possible that a race condition affects this string, when it was passed as a value? What kind of data corruption could have happened that this part of the code panics? From my understanding, the if len(s) >= 8 should protect all array references in this branch.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.