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

runtime: gostringnocopy doesn't update maxstring #8706

Closed
josharian opened this issue Sep 11, 2014 · 3 comments
Closed

runtime: gostringnocopy doesn't update maxstring #8706

josharian opened this issue Sep 11, 2014 · 3 comments

Comments

@josharian
Copy link
Contributor

$ cat x.go
package main

import "os"

func main() {
    println(os.Getenv("TOOLONG"))
}

$ TOOLONG="too long too long too long too long too long too long too long too long
too long too long too long too long too long too long too long too long too long too
long too long too long too long too long too long too long too long too long too long
too long too long" go run x.go
[string too long]

Changing println to fmt.Println results in the string being printed.

The runtime cost of updating maxstring probably makes this not worth fixing.
@randall77
Copy link
Contributor

Comment 1:

I think we should fix this.  The cost isn't that much, only a load/compare/branch in the
common case.  It's a lot less than the findnull the code has to do.

Owner changed to @randall77.

@gopherbot
Copy link

Comment 2:

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

@randall77
Copy link
Contributor

Comment 3:

This issue was closed by revision bcd36e8.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants