Repository navigation
Conversation
Two RecordAssertion() calls in RegularExpressionBBTestFunction.c print the
regular expression syntax type with %g, but pass *RegExSyntaxTypeList3 and
*RegExSyntaxTypeList2, i.e. an EFI_GUID by value. SctLib's %g implementation
does va_arg (args, EFI_GUID *), so it expects a pointer.
On AArch64 (AAPCS64) a 16-byte aggregate passed to a variadic function is not
passed by reference, so va_arg() consumes only the first 8 bytes of the GUID
and treats them as the pointer. GuidToString() then dereferences it and the
test takes a data abort. For EFI_REGEX_SYNTAX_TYPE_POSIX_EXTENDED_GUID
{5F05B20F-4A56-C231-FA0B-A7B1F110041D} the faulting address is
0xC2314A565F05B20F, the first 8 bytes of that GUID.
Pass the EFI_GUID pointer instead, as %g requires.
Fixes tianocore#371
Signed-off-by: Simon Wang <simowang@nvidia.com>
wangsim
marked this pull request as ready for review
October 14, 2026 15:20
tianocore-assign-reviewers
Bot
requested review from
anncheng-arm,
cgjertsen,
edhay,
shellyki-intel and
sunnywang-arm
October 14, 2026 15:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two RecordAssertion() calls in RegularExpressionBBTestFunction.c print the regular expression syntax type with %g, but pass *RegExSyntaxTypeList3 and *RegExSyntaxTypeList2, i.e. an EFI_GUID by value. SctLib's %g implementation does va_arg (args, EFI_GUID *), so it expects a pointer.
On AArch64 (AAPCS64) a 16-byte aggregate passed to a variadic function is not passed by reference, so va_arg() consumes only the first 8 bytes of the GUID and treats them as the pointer. GuidToString() then dereferences it and the test takes a data abort. For EFI_REGEX_SYNTAX_TYPE_POSIX_EXTENDED_GUID {5F05B20F-4A56-C231-FA0B-A7B1F110041D} the faulting address is 0xC2314A565F05B20F, the first 8 bytes of that GUID.
Pass the EFI_GUID pointer instead, as %g requires.
Fixes #371