Skip to content
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

regexp: slice bounds out of range (2) #11178

Closed
dvyukov opened this issue Jun 11, 2015 · 1 comment
Closed

regexp: slice bounds out of range (2) #11178

dvyukov opened this issue Jun 11, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

@dvyukov dvyukov commented Jun 11, 2015

package main

import "regexp"

func main() {
    regexp.MustCompile("((00(0){0}){3}){30}").ReplaceAllString("000000000", "000000$00")
}
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
regexp.(*machine).init(0xc2080c8240, 0x8)
    src/regexp/exec.go:92 +0x70
regexp.(*Regexp).doExecute(0xc2080f0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4c67b0, 0x9, 0x0, 0x8, ...)
    src/regexp/exec.go:454 +0x508
regexp.(*Regexp).replaceAll(0xc2080f0000, 0x0, 0x0, 0x0, 0x4c67b0, 0x9, 0x8, 0xc20807ded8, 0x0, 0x0, ...)
    src/regexp/regexp.go:486 +0xf8
regexp.(*Regexp).ReplaceAllString(0xc2080f0000, 0x4c67b0, 0x9, 0x4c6790, 0x9, 0x0, 0x0)
    src/regexp/regexp.go:449 +0x107
main.main()
    regexp.go:6 +0x64

go version devel +b0532a9 Mon Jun 8 05:13:15 2015 +0000 linux/amd64

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jun 11, 2015
@gopherbot
Copy link

@gopherbot gopherbot commented Aug 28, 2015

CL https://golang.org/cl/14013 mentions this issue.

@rsc rsc closed this in f75f2f3 Oct 23, 2015
@golang golang locked and limited conversation to collaborators Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.