-
Notifications
You must be signed in to change notification settings - Fork 18k
x/image: draw.Copy causes stack overflow when dr and sr have same size and DstMask is not nil #23107
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
Labels
Milestone
Comments
Change https://golang.org/cl/83537 mentions this issue: |
mrhyperbit23z0d
added a commit
to mrhyperbit23z0d/bhegde8
that referenced
this issue
Jun 6, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
GalaxyForcew
added a commit
to GalaxyForcew/A1bisshy
that referenced
this issue
Jun 6, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
yi-ge3
added a commit
to yi-ge3/wislie
that referenced
this issue
Jun 6, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
balloontmz6
added a commit
to balloontmz6/Likewise42l
that referenced
this issue
Jun 6, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
snapbakkhfbav
added a commit
to snapbakkhfbav/SayedBaladohr
that referenced
this issue
Oct 6, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
MiderWong5ddop
added a commit
to MiderWong5ddop/sidie88f
that referenced
this issue
Oct 7, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
rorypeckwnt4v
added a commit
to rorypeckwnt4v/LearnByBhanuPrataph
that referenced
this issue
Oct 7, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
egorovcharenko9
added a commit
to egorovcharenko9/RiceBIOC470z
that referenced
this issue
Oct 7, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
RafayGhafoorf
added a commit
to RafayGhafoorf/dustinsand8
that referenced
this issue
Oct 7, 2022
When DstMask is not nil, this shortcut causes stack overflow because Copy function in turn will call Scale with same dr and sr. Fixes golang/go#23107 Change-Id: I8ccadbd9b7f16363ac17b6114308527d6fa9456e Reviewed-on: https://go-review.googlesource.com/83537 Reviewed-by: Nigel Tao <nigeltao@golang.org> Run-TryBot: Nigel Tao <nigeltao@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There is a shortcut in
Scale
function that callsCopy
whendst rect
has same size withsrc rect
.However the
Copy
function calls Scale whenDstMask
is defined:Thus causes stack overflow. I'm going to send a code review for this.
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jiulongw/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.9.2/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.9.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bv/5bgcs_qj2557dnm8yq7b2t6m0000gn/T/go-build063560038=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
With following test code added to
golang.org/x/image/draw
:Running
go test
results:The text was updated successfully, but these errors were encountered: