slice bounds out of range when test "examples/simplegrep"
- Dominant language
- C++
- Stars
- 5.5k
- Forks
- 816
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 2
Description
On my mac run:
`time go run main.go ".*=.*" a`, and got
`.*=.*
258
Scanning 5 bytes with Hyperscan
x=x
x=x
x=x
panic: runtime error: slice bounds out of range
goroutine 1 [running]:
main.eventHandler(0x0, 0x0, 0x5, 0x0, 0x40e3700, 0xc00009a080, 0x4014102, 0x7ffeefbff3f0)
/code/gohs/examples/simplegrep/main.go:75 +0x461
github.com/flier/gohs/hyperscan.hsMatchEventCallback(0xc000000000, 0x0, 0x5, 0xc000000000, 0xc0000b1dd0, 0x30)
/code/gohs/hyperscan/internal.go:917 +0x61
github.com/flier/gohs/hyperscan._cgoexpwrap_2994d25f698d_hsMatchEventCallback(0xc000000000, 0x0, 0x5, 0x0, 0xc0000b1dd0, 0x0)
_cgo_gotypes.go:946 +0x4f
github.com/flier/gohs/hyperscan._Cfunc_hs_scan_cgo(0x4802400, 0xc0000c4000, 0x5, 0x4803800, 0xc0000b1dd0, 0xc000000000)
_cgo_gotypes.go:626 +0x4d
github.com/flier/gohs/hyperscan.hsScan.func1(0x4802400, 0xc0000c4000, 0x5, 0x205, 0x0, 0x4803800, 0xc0000b1dd0, 0xc0000c6100)
/code/gohs/hyperscan/internal.go:932 +0xcd
github.com/flier/gohs/hyperscan.hsScan(0x4802400, 0xc0000c4000, 0x5, 0x205, 0x0, 0x4803800, 0x4117be0, 0x40e3700, 0xc00009a080, 0xc0000c8001, ...)
/code/gohs/hyperscan/internal.go:932 +0xbe
github.com/flier/gohs/hyperscan.(*blockScanner).Scan(0xc00008a038, 0xc0000c4000, 0x5, 0x205, 0xc00008a058, 0x4117be0, 0x40e3700, 0xc00009a080, 0x0, 0x0)
/code/gohs/hyperscan/runtime.go:298 +0xac
main.main()
/code/gohs/examples/simplegrep/main.go:148 +0x46b
exit status 2
real 0m0.549s
user 0m0.448s
sys 0m0.402s`
Something wrong with the test case or the core code?
Contributor guide
Assessment
This issue has not been assessed yet.