Commit 1c052b2
Pass message_factory to reflection->GetMessage in cel::Value::WrapField.
Inside WrapFieldImpl in value.cc, CEL called reflection->GetMessage(*message, field)
without passing message_factory as the 3rd argument. When message is a compiled C++
GeneratedMessage, Protobuf reflection defaulted factory to MessageFactory::generated_factory().
If field is an extension whose descriptor lives in a dynamic DescriptorPool,
generated_factory()->GetPrototype(extension_desc) returns nullptr, causing a
SIGSEGV (@(nil)) in ExtensionSet::GetMessage().
This CL passes message_factory to reflection->GetMessage(*message, field, message_factory)
so Protobuf reflection uses CEL's MessageFactory to resolve dynamic extensions.
PiperOrigin-RevId: 9571731111 parent 1c4f3fc commit 1c052b2
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
1587 | | - | |
| 1586 | + | |
| 1587 | + | |
1588 | 1588 | | |
1589 | | - | |
1590 | | - | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1591 | 1592 | | |
1592 | 1593 | | |
1593 | 1594 | | |
| |||
0 commit comments