Commit Graph

2 Commits

Author SHA1 Message Date
Joe Tsai
ea6e3da5ef internal/testprotos/legacy: avoid direct dependency on github.com/golang/protobuf
Change-Id: I42b17ae672a76d91ecbeeb2c12949002d7720524
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/222677
Reviewed-by: Damien Neil <dneil@google.com>
2020-03-09 19:39:04 +00:00
Damien Neil
13e7f145cc reflect/protoregistry: avoid deadlock in registration
Under some rare circumstances registration can deadlock
when lazy descriptor initialization consults the registry.

Move the call triggering the lazy init out of the critical section.

Fixes golang/protobuf#1052.

Change-Id: Ic266e06b0db99fea65e797b879ce53e5342fff95
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/204804
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2020-03-05 17:35:16 +00:00