Closed danshaffer closed 6 years ago
@danshaffer Thank you for reporting this bug. I'll take a look and try to send out a fix.
I'll close this issue because we actually ended up fixing this in 09354db1434859a31a3c81abebcc4018d42f2715 for the 3.4 release.
I'm observing what looks like FieldMask is calling
mutable_foo
on messages underneath oneofs, causing the oneof_case to switch and leading to data loss.We are using protobuf v3.3.1. Here's a simple unit test that repros this issue:
oneof_mask.proto:
oneof_mask_test.cc:
And test output: