Skip to content

Commit 8af0498

Browse files
ondrejmirtesclaude
andcommitted
Initialize the zval ResolvedFunctionVariantWithOriginal caches its flag in
GCC 11.4's instrumented PGO stage reports it as maybe-uninitialized once the extension is built with per-function sections, which -Werror turns into a build failure. Initializing flagged locals is the convention. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qi7GRGMn9ZuY2jSc97wqBF
1 parent 732594b commit 8af0498

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎turbo-ext/src/ResolvedFunctionVariantWithOriginal.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class ResolvedFunctionVariantWithOriginal
246246
zv::Val has = pt_type_op(Z_OBJ_P(returnType.raw()), PT_OP_HAS_TEMPLATE_OR_LATE_RESOLVABLE_TYPE, 0, NULL);
247247
if (UNEXPECTED(has.isUndef())) return zv::Val();
248248
hasTemplate = zend_is_true(has.raw());
249-
zval value;
249+
zval value = {};
250250
ZVAL_BOOL(&value, hasTemplate);
251251
pt_write_slot(self, slots::hasTemplateOrLateResolvableReturnType, &value);
252252
}

0 commit comments

Comments
 (0)