You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go.dev test github.com/yuin/gopher-lua
--- FAIL: TestLua (5.72s)
script_test.go:74: runtime error: slice bounds out of range
stack traceback:
[G]: in function 'match'
pm.lua:12: in function 'f1'
pm.lua:77: in main chunk
[G]: ?
Where str is a string. That's not a safe thing to do. The pointer and length of the resulting []byte slice are ok, but the capacity is junk. That slice later gets subsliced at github.com/yuin/gopher-lua/pm/pm.go:591 and the junk capacity makes that slicing fail.
Pure luck that this used to work at all.
I'll open an issue against gopher-lua.
There's no need to use @block rules, as canMergeLoad makes sure that
the load and op are already in the same block.
With no @block needed, we also don't need to set the type explicitly.
It can just be inherited from the op being rewritten.
Noticed while working on #19284.
Change-Id: Ied8bcc8058260118ff7e166093112e29107bcb7e
Reviewed-on: https://go-review.googlesource.com/37585
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
21c71d7 caused a regression.
Using yuin/gopher-lua@eed1c79 it passes on the Go revision before 21c71d7, but fails afterwards.
\cc @TocarIP @randall77
The text was updated successfully, but these errors were encountered: