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

archive/zip: data race #3968

Closed
dvyukov opened this issue Aug 17, 2012 · 4 comments
Closed

archive/zip: data race #3968

dvyukov opened this issue Aug 17, 2012 · 4 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Aug 17, 2012

ThreadSanitizer says:

WARNING: DATA RACE
Write by goroutine 24:
  archive/zip.readDataDescriptor()
      src/pkg/archive/zip/reader.go:267 +0x2be
  archive/zip.(*checksumReader).Read()
      src/pkg/archive/zip/reader.go:164 +0x294
  bytes.(*Buffer).ReadFrom()
      src/pkg/bytes/buffer.go:166 +0x3cc
  io.Copy()
      src/pkg/io/io.go:352 +0xc6
  archive/zip.readTestFile()
      src/pkg/archive/zip/reader_test.go:329 +0x7ad
  archive/zip.func·001()
      src/pkg/archive/zip/reader_test.go:287 +0x16d

Previous read by goroutine 27:
  archive/zip.(*File).Open()
      src/pkg/archive/zip/reader.go:126 +0xbf
  archive/zip.readTestFile()
      src/pkg/archive/zip/reader_test.go:319 +0x4ca
  archive/zip.func·001()
      src/pkg/archive/zip/reader_test.go:287 +0x16d

Goroutine 24 (running) created at:
  archive/zip.readTestZip()
      src/pkg/archive/zip/reader_test.go:289 +0x834
  archive/zip.TestReader()
      src/pkg/archive/zip/reader_test.go:236 +0xe7
  testing.tRunner()
      src/pkg/testing/testing.go:297 +0xc9

Goroutine 27 (running) created at:
  archive/zip.readTestZip()
      src/pkg/archive/zip/reader_test.go:289 +0x834
  archive/zip.TestReader()
      src/pkg/archive/zip/reader_test.go:236 +0xe7
  testing.tRunner()
      src/pkg/testing/testing.go:297 +0xc9
@robpike
Copy link
Contributor

robpike commented Aug 19, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 2:

What version of the code do you have? I can't make sense of the line numbers.

@rsc
Copy link
Contributor

rsc commented Sep 12, 2012

Comment 3:

Labels changed: added go1.1maybe.

@dvyukov
Copy link
Member Author

dvyukov commented Oct 10, 2012

Comment 5:

Accidentally fixed by https://golang.org/cl/6463050
readDataDescriptor() does not overwrite CompressedSize/UncompressedSize any more.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
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

4 participants