commit | 32e8a52cbf725da29a861607ba9be0bcda8867d3 | [log] [tgz] |
---|---|---|
author | Joe Tsai <joetsai@digital-static.net> | Tue Jul 02 10:51:24 2019 -0700 |
committer | Joe Tsai <joetsai@digital-static.net> | Tue Jul 02 18:39:06 2019 +0000 |
tree | dc0e433513e4c79e1bfbe19fe681100298977aad | |
parent | 3274acc9266d0347ee0e078dc077c8d53d428ea1 [diff] |
internal/impl: fix race in aberrant message logic Previously, when aberrantLoadMessageDesc returned it was guaranteed to have initialized the current message through the use of the done signal. However, this does not guarantee that the descriptor for a cylic reference has also finished initialization. Rather than add more complicated logic to wait until all cyclic references have finished initializing, just add a global lock for the entire aberrantLoadMessageDesc function. This slows down performance, but is easier to reason about. Change-Id: I4cdae8b955f71ee40fa6979f5a8d548d9749042c Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/184657 Reviewed-by: Damien Neil <dneil@google.com>
WARNING: This repository is in active development. There are no guarantees about API stability. Breaking changes will occur until a stable release is made and announced.
This repository is for the development of the next major Go implementation of protocol buffers. This library makes breaking API changes relative to the existing Go protobuf library. Of particular note, this API aims to make protobuf reflection a first-class feature of the API and implements the protobuf ecosystem in terms of reflection.
List of relevant design documents:
We appreciate community contributions. See CONTRIBUTING.md.
Issues regarding the new API can be filed at github.com/golang/protobuf. Please use a APIv2:
prefix in the title to make it clear that the issue is regarding the new API work.