Skip to content

Pass message_factory to reflection->GetMessage in cel::Value::WrapField. - #2186

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_957173111
Aug 3, 2026
Merged

Pass message_factory to reflection->GetMessage in cel::Value::WrapField.#2186
copybara-service[bot] merged 1 commit into
masterfrom
test_957173111

Conversation

@copybara-service

Copy link
Copy Markdown

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.

@copybara-service
copybara-service Bot force-pushed the test_957173111 branch 3 times, most recently from c3e873f to 1c052b2 Compare August 3, 2026 11:45
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: 958311978
@copybara-service
copybara-service Bot merged commit 4f1003d into master Aug 3, 2026
@copybara-service
copybara-service Bot deleted the test_957173111 branch August 3, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant