commit | e07747d8d2cee6639b14ba8021d453a6b8dd9edc | [log] [tgz] |
---|---|---|
author | Katie Hockman <katie@golang.org> | Mon Aug 20 15:55:28 2018 -0400 |
committer | Katie Hockman <katie@golang.org> | Tue Aug 21 19:00:53 2018 +0000 |
tree | 8fe8da2d1936978eab694ced9f87bb3357781158 | |
parent | 0757b4eacee46aad9fd6cfbe2ec359fbd92cd316 [diff] |
playground: prevent caching memory-related runtime errors The existing implementation only prevents code caching if the code has certain compile-time errors. Code with deterministic runtime errors, such as out of memory errors, are being cached. This causes errors to be returned in the Go Tour if a different user's run caused an error. The cache had to be manually cleared in order to clean out the bad run. This change prevents code that threw an "out of memory" or a "cannot allocate memory" error from being cached. Fixes golang/go#26926 Change-Id: Ib281f3076bc674e7c2f08bf9b5c4be36da22d28e Reviewed-on: https://go-review.googlesource.com/130035 Reviewed-by: Andrew Bonventre <andybons@golang.org>
This subrepository holds the source for the Go playground: https://play.golang.org/
# build the image docker build -t playground .
docker run --name=play --rm -d -p 8080:8080 playground # run some Go code cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile
gcloud --project=golang-org --account=person@example.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.