New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/text/unicode: Panic on a particular string #20079
Labels
Milestone
Comments
This is an issue with the combining step of normalization; here's a program derived from the above: package main
import "golang.org/x/text/unicode/norm"
func main() {
s := "\xeb\xcd\x84\xdb\x98\xcc\xb4\xcd\x84\xdb" +
"\x98\xcc\xb4\xcd\x84\xdb\x98\xcc\xb4\xcd\x84\xdb" +
"\x98\xcc\xb4\xcd\x84\xdb\x98\xcc\xb4\xcd\x84\xdb" +
"\x98\xcc\xb4\xcd\x84\xdb\x98\xcc\xb4\xcd\x84"
norm.NFC.String(s)
} Bisecting between the current HEAD (golang/text@a9a8202) and golang/text@5ff64564 shows the following commit as the first one with the panic:
/cc @mpvl |
SamWhited
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Apr 24, 2017
CL https://golang.org/cl/41680 mentions this issue. |
CL https://golang.org/cl/41697 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
When running go-fuzz against a personal package, I found a string that causes
precis / unicode to panic.
What version of Go are you using (
go version
)?go version go1.8 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/redacted/go/workspace/"
GORACE=""
GOROOT="/home/redacted/go/go"
GOTOOLDIR="/home/redacted/go/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build130217842=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Run go-fuzz against one of my packages, and found the following input that
causes x/text/unicode to panic.
Just in case, I updated the package, and is now at commit 9a820217f98f7c8a207ec1e45a874e1fe12c478 ("internal/catmsg: added varint implementation").
The test calls x/text/secure/precis (as that's how I found it), which then calls x/text/unicode, which panics.
I have not yet investigated further or reduced the input; I'll post updates if I do and get something useful.
Test program
(also at https://play.golang.org/p/3X0GsJQLb-):
Output
The text was updated successfully, but these errors were encountered: