veyron2/vdl: Fix race in TypeFromReflect.
The race would cause TypeBuilder to be called with two different
pointers for the same underlying type, which results in the
"duplicate type names" error.
FYI I tried to add a localized test to expose the race, but was
unsuccessful. Note that there's already a multi-goroutine test
in TestTypeFromReflect.
This fixes bug #585, where TestDebugServer would reliably fail
within ~100 runs without the fix, and passes 1000 runs with the
fix.
Change-Id: I1bd3dc6433a52fd3f9d9acc12f61dddd11ffcc88
1 file changed