Skip to content

patina-v20.1.0

Choose a tag to compare

@github-actions github-actions released this 06 Mar 15:00
· 252 commits to refs/heads/main since this release
b41d806

What's Changed

  • patina\_debugger: Cleanup features and feature usage @cfernald (#1372)
    Change Details
      ## Description

    This commit addresses two issues with the patina_debugger features:

    1. Removes the windbg_workarounds feature. Windbg is the primary supported scenario for patina_debugger, and these workaround do not inhibit other debuggers from working. Removing the feature reduces complexity and removes the ability for users to accidentally break windbg support.

    2. Removes the default features from patina_debugger for the workspace crate. This allows the features to be enabled for the appropriate core and by end platforms if applicable.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Regression tested with windbg on Q35

    Integration Instructions

    N/A




  • sdk/patina: Fix stack access violation in GuidHob test helpers @makubacki (#1363)
    Change Details
      ## Description

    gen_guid_hob() returned a (GuidHob, Box<[u8]>) tuple where the struct lived on the stack and the data lived on the heap (not contiguous in memory).

    Then, HobTrait::size() for GuidHob returns header.length (struct size + data size) while as_ptr() returns the struct's start address. Any code calling from_raw_parts(as_ptr(), size()) would read past the end of the stack-allocated struct into adjacent stack memory.

    This change fixes this by modifying gen_guid_hob() to return a Vec<u8> containing the GuidHob struct bytes followed by the data bytes in a single contiguous heap allocation. This matches normal firmware memory layout where GUID HOB data immediately follows the header. A new guid_hob_refs() helper extracts typed (&GuidHob, &[u8]) references from the contiguous buffer.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • N/A - Only impacts module's unit tests


  • debug\_image\_info\_table: Use global test lock in tests @makubacki (#1361)
    Change Details
      ## Description

    Wraps unit tests in with_locked_state() to follow the same pattern used by other patina_dxe_core test modules.

    This is done to ensure consistent test isolation under the global test lock and prevent potential non-deterministic failures if these tests or parallel tests are later extended to interact with global state.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • N/A - Only impacts module unit tests


  • StackTrace: AArch64: Add Frame pointer based stack trace support for GCC compiled PE binaries @vineelko (#1317)
    Change Details
      ## Description

    Dumps the stack trace by walking the FP/LR registers, without relying on unwind information. This is an AArch64-only fallback mechanism.

    For GCC built PE images, .pdata/.xdata sections are not generated, causing stack trace dumping to fail. In this case, we attempt to dump the stack trace using an FP/LR register walk with the following limitations:

    1. Patina binaries produced with LLVM almost always do not save FP/LR register pairs as part of the function prologue for non-leaf functions, even though the ABI mandates it. https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#646the-frame-pointer

    2. Forcing this with the -C force-frame-pointers=yes compiler flag can produce strange results. In some cases, instead of saving fp/lr using stp x29, x30, [sp, #16]!, it saves lr/fp using stp x30, x29, [sp, #16]!, completely breaking the stack walk. https://godbolt.org/z/7s9fG9vWe

    3. Due to the above reasons, the stack walk cannot be reliably terminated.

    The only reason this is being introduced is to identify the driver/app causing the exception. For example, a Shell app built with GCC that triggers an assertion can still produce a reasonable stack trace.

    Dumping stack trace with PC: 000001007AB72ED0, SP: 0000010078885D50, FP: 0000010078885D50
        # Child-SP              Return Address         Call Site
        0 0000010078885D50      000001007AB12770       Shell+66ED0
        1 0000010078885E90      0000010007B98DCC       Shell+6770
        2 0000010078885FF0      0000010007B98E54       qemu_sbsa_dxe_core+18DCC
        3 0000010007FFF4C0      0000010007B98F48       qemu_sbsa_dxe_core+18E54
        4 0000010007FFF800      000001007AF54D08       qemu_sbsa_dxe_core+18F48
        5 0000010007FFFA90      0000010007BAC388       BdsDxe+8D08
        6 0000010007FFFF80      0000000010008878       qemu_sbsa_dxe_core+2C388 --.
                                                                                  |
        0:000> u qemu_sbsa_dxe_core!patina_dxe_core::call_bds                     |
        00000000`1002c1b0 f81f0ff3 str x19,[sp,#-0x10]!                           |
        00000000`1002c1b4 f90007fe str lr,[sp,#8]     <---------------------------'
        00000000`1002c1b8 d10183ff sub sp,sp,#0x60
    
        The FP is not saved, so the return address in frame #6 is garbage.
    

    Symbol to source file resolution(Resolving frame 2): Since some modules in the stack trace are built with GCC and do not generate PDB files, their symbols must be resolved manually as shown below.

    $ addr2line -e Shell.debug -f -C 0x6770
    UefiMain
    ~/repos/patina-qemu/MU_BASECORE/ShellPkg/Application/Shell/Shell.c:372
    
       371:  ASSERT (FALSE);
     > 372:  Status = gST->ConOut->ClearScreen (gST->ConOut);
       373:  if (EFI_ERROR (Status)) {
       374:     return (Status);
       375:  }
    

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Validated on SBSA Q35.

    Integration Instructions

    The change is already hooked into the exception handler for AArch64.




  • Add call to set\_handle to add the DXE core image handle to component storage. @joschock (#1359)
    Change Details
      ## Description

    Add call to set_handle to add the DXE core image handle to component storage.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Observed that a test component with a params::Handle argument on the entry point now dispatches as expected (without this change, it did not).

    Integration Instructions

    N/A




  • Add QEMU validation pending notification workflow @makubacki (#1357)
    Change Details
      ## Description

    Add a workflow that posts a "pending" comment on PRs immediately when pushed, indicating QEMU validation is waiting for CI to complete.

    This prevents prior stale results from sitting around while CI runs and lets users know QEMU validation will happen soon if the workflow has not previously been run on the PR.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • Verify comment is posted/updated as expected on fork (with a PR from another fork)

    Integration Instructions

    • N/A


  • debug\_image\_info\_table: Only update capacity after successful allocation @makubacki (#1356)
    Change Details
      ## Description

    grow() updated self.capacity before verifying allocation success. If alloc_zeroed() or realloc() returned null, the struct invariants were violated since capacity indicated space that was never allocated.

    If that happened, impl Drop for DebugImageInfoData would then call alloc::alloc::dealloc() with an incorrect layout against a null or stale pointer, resulting in undefined behavior.

    This change:

    • Defers the capacity update until after the allocation result is confirmed to be non-null.
    • Adds an explicit null pointer check on the allocation results.
    • Introduces a new GrowError enum type to distinguish LayoutError from allocation failures.
    • Makes DEFAULT_CAPACITY less brittle in unit tests

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • N/A


  • [REBASE \& FF] Minor cosmetic code hygiene cleanup/fixups @vineelko (#1354)
    Change Details
      ## Description
    trim trailing whitespace.................................................Passed
    check for added large files..............................................Passed
    check for case conflicts.................................................Passed
    fix end of files.........................................................Passed
    fix utf-8 byte order marker..............................................Passed
    check json...........................................(no files to check)Skipped
    check json5..........................................(no files to check)Skipped
    check toml...............................................................Passed
    check yaml...........................................(no files to check)Skipped
    check xml................................................................Passed
    mixed line ending........................................................Passed
    check for broken symlinks............................(no files to check)Skipped
    check for merge conflicts................................................Passed
    detect private key.......................................................Passed
    check that executables have shebangs.....................................Passed
    
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Verified mdbook functionality locally.

    Integration Instructions

    NA




  • Move to upstream corosensei to allow deprecation of uefi-corosensei @joschock (#1352)
    Change Details
      ## Description

    Switches corosensei to the upstream corosensei which now has support for the uefi targets. This will allow deprecation of the previous uefi_corosensei fork.

    Closes #1275

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Booted to OS on AARCH64 hardware. start_image and exit (primary consumers of corosensei) execute as expected.

    Integration Instructions

    N/A




  • .github/patina-qemu-pr-validation.yml: Skip when a PR is merged @makubacki (#1350)
    Change Details
      ## Description

    The case when a PR branch is not found was considered a failure in the API to find the PR. However, this will also happen when is merged and the CI workflow runs. In either case, treat this as a "skip" instead of an "error".

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • Run with PR branch still available
    • Run with PR branch deleted

    Integration Instructions

    • N/A


  • Improve panic handling @berlin-with0ut-return (#1264)
    Change Details
      ## Description Addresses https://github.com//issues/1233.

    This PR improves panic handling and logging for error cases. Some panics have been converted to errors, while others have simply been improved in clarity.

    • Impacts functionality? -> instead of panic in some cases, returned error.
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    cargo make all

    Integration Instructions

    I would consider this more of a first pass. There may have been some panics that I missed, and possibly some panics that have been kept that would be better as Result/Options.




  • Add Patina QEMU PR Validation [Rebase \& FF] @makubacki (#1339)
    Change Details
      ## Description

    Two commits to add Patina QEMU testing on PRs in this repository.

    See OpenDevicePartnership/patina-devops#81 for more details about the workflows themselves.


    .github: And Patina QEMU validation workflows

    Adds:

    • .github/workflows/patina-qemu-pr-validation.yml: Validates the
      patina PR changes on QEMU.
    • .github/workflows/patina-qemu-pr-validation-post.yml: Posts the
      results from the QEMU run back to the patina PR.

    Temporarily sets the patina-devops branch to patina_e2e_plat_validation
    in OpenDevicePartnership/patina-devops during a "rollout" phase of the
    new workflow so any adjustments can be quickly made. Once the workflow
    is stable, workflows in the patina-devops release will be referenced
    instead.


    .github/ci-workflow.yml: Prevent concurrent runs

    Create a concurrency group to enforce only a single CI workflow is run
    per PR at a time.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • Various PR scenarios on fork:
      • Successful run
      • Compilation failure
      • Boot failure
      • Cancellation of workflow due to a new PR push
      • Log artifacts uploaded successfully
      • Creation of comment in a new PR
      • Amendment of comments in an existing PR

    Integration Instructions

    • N/A - Only used for CI in this repo


  • Cargo.toml: Drop Profiles @os-d (#1346)
    Change Details
      ## Description

    Now that profiles are in config.toml, drop them from Cargo.toml.

    This commit was intended as part of the repo file sync, but I made a mistake and it wasn't included. I checked the other repos, they all correctly have this commit.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Tested with other RFC 25 changes.

    Integration Instructions

    N/A.




🚀 Features & ✨ Enhancements

  • Makefile.toml: Add test-asan task for AddressSanitizer testing @makubacki (#1368)
    Change Details
      ## Description

    Adds a test-asan task that runs tests with AddressSanitizer (-Zsanitizer=address) enabled. The task supports Windows x64 and Linux hosts.

    Full task command: cargo make test-asan

    On Windows [1], ASan-instrumented binaries require the MSVC ASan runtime DLL (clang_rt.asan_dynamic-x86_64.dll) to be on PATH at runtime so that's done as part of the task setup. The DLL location is resolved using the VC toolset installation path from vswhere [2].

    On Linux, no additional setup is needed as the ASan runtime is resolved automatically by the linker.

    [1] https://learn.microsoft.com/cpp/sanitizers/asan
    [2] https://github.com/microsoft/vswhere/wiki/Find-VC

    A --print-dll-path argument is supported on Windows to print the resolved ASan DLL path and exit, which can be useful for adding that to the system PATH when running tests outside of cargo make.


    Note: I've already fixed an initial set of issues other than (mostly intentional) memory leaks. I can add this to CI in a follow up PR if there is interest in doing so. This PR is to raise awareness in the patina repo about the change. It will be added to Makefile.toml in patina-devops as well, if accepted.


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make test-asan on Windows (with Visual Studio installed) and Ubuntu 24.04

    Integration Instructions

    • N/A - New task available


🐛 Bug Fixes

  • patina\_acpi: Unit test stability fixes [Rebase \& FF] @makubacki (#1365)
    Change Details
      ## Description

    Fixes two issues that impact stability of host-based unit tests in patina_acpi.


    patina_acpi: Prevent cloning invalid buffers

    Various places in the acpi module use this pattern check a table's signature or read it length from a raw pointer.

    if (unsafe { (*xsdt_header).clone() }).signature != signature::XSDT {

    AcpiTableHeader is defined as:

    pub struct AcpiTableHeader {
        pub signature: u32,
        pub length: u32,
        pub revision: u8,
        pub checksum: u8,
        pub oem_id: [u8; 6],
        pub oem_table_id: [u8; 8],
        pub oem_revision: u32,
        pub creator_id: u32,
        pub creator_revision: u32,
    }

    Which is 36 bytes in size. The issue is that some tests like mock_rsdp() intentionally create tables with invalid length fields that are less than 36 bytes. For example, this is backed by 35 bytes:

    StandardAcpiProvider::<MockBootServices>::get_xsdt_address_from_rsdp(mock_rsdp(
        signature::ACPI_RSDP_TABLE,
        true,
        ACPI_HEADER_LEN - 1,
        signature::XSDT,
    ))

    This resulted in .clone() reading 36 bytes from a 35 byte buffer.

    This is fixed by replacing those (*ptr).clone() on AcpiTableHeader calls with targeted read_signature_from_ptr() and read_length_from_ptr() helpers that read only the needed 4-byte field.

    Also , mock_rsdp() is updated to always allocate at least ACPI_HEADER_LEN bytes for the XSDT buffer, decoupling the allocation size from the (possibly invalid) length field value under test.


    patina_acpi: Fix stack buffer access in ACPI tests

    A few tests in the module created ACPI table structs on the stack like:

    let header1 = AcpiTableHeader { signature: 0x10, length: 101, ..Default::default() };
    let table1 = unsafe { AcpiTable::new(header1, ...).unwrap() };

    Note that AcpiTableHeader is actually 36 bytes, but the length field (for testing) claimed 101 bytes. Eventaully, this code is executed:

    // Copy entire table into the new allocation.
    // SAFETY: If function preconditions are met, the pointer is valid and points to a valid ACPI table header.
    // SAFETY: If function preconditions are met, the table length is guaranteed to be correct.
    // SAFETY: If allocation succeeds, the destination is valid for writes of `table_length` bytes.
    unsafe {
        ptr::copy_nonoverlapping(header_ptr as *const u8, dest_alloc, table_length);
    }

    Now, a copy is being made of 101 bytes from a 36-byte stack variable.

    This change prevents this by updating AcpiTable::new<T>() to require that the header length field exactly matches the size of the struct T. The size check is made before Table::new() is called.

    Tables with variable-length data should use AcpiTable::new_from_ptr() instead, where the caller guarantees that the table length is correct.

    Also updates a test in service.rs that created an AcpiFadt to use the struct size for the table length.

    A test was not found that checks the AcpiTable::new_from_ptr() case where the length exceeds the struct size, so code for that was added to test_new_from_ptr_creates_valid_acpi_table().


    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • Review the updated expectations for AcpiTable::new<T>().

    More Details

    Address Sanitizer output before **patina_acpi: Prevent cloning invalid buffers** commit:

    ==54216==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x1201608ae173 at pc 0x7ff7f7136d1a bp 0x0096809fe850 sp 0x0096809fe860
    READ of size 4 at 0x1201608ae173 thread T7
        #0 0x7ff7f7136d19 in <patina_acpi::acpi_table::AcpiTableHeader as core::clone::Clone>::clone C:\src\patina\components\patina_acpi\src\acpi_table.rs:292
        #1 0x7ff7f7103f2e in <patina_acpi::acpi::StandardAcpiProvider<patina::boot_services::MockBootServices>>::get_xsdt_address_from_rsdp C:\src\patina\components\patina_acpi\src\acpi.rs:258
        #2 0x7ff7f706e908 in patina_acpi::acpi::tests::test_get_xsdt_address C:\src\patina\components\patina_acpi\src\acpi.rs:1287
        #3 0x7ff7f70f3da7 in patina_acpi::acpi::tests::test_get_xsdt_address::{closure#0} C:\src\patina\components\patina_acpi\src\acpi.rs:1247
        #4 0x7ff7f70d5f71 in <patina_acpi::acpi::tests::test_get_xsdt_address::{closure#0} as core::ops::function::FnOnce<()>>::call_once C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
        #5 0x7ff7f713779f in core::ops::function::FnOnce::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #6 0x7ff7f713779f in test::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,alloc::string::String> >,enum2$<core::result::Result<tuple$<>,alloc::string::String> > (*)()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:663
        #7 0x7ff7f7144f5c in test::run_test_in_process::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #8 0x7ff7f7144f5c in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #9 0x7ff7f7144f5c in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #10 0x7ff7f7144f5c in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #11 0x7ff7f7144f5c in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #12 0x7ff7f7144f5c in test::run_test_in_process /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #13 0x7ff7f7144f5c in test::run_test::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:607
        #14 0x7ff7f713f29b in test::run_test::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:637
        #15 0x7ff7f713f29b in std::sys::backtrace::__rust_begin_short_backtrace::<test::run_test::{closure#1}, ()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\backtrace.rs:160
        #16 0x7ff7f7148941 in std::thread::lifecycle::spawn_unchecked::closure$1::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:92
        #17 0x7ff7f7148941 in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #18 0x7ff7f7148941 in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #19 0x7ff7f7148941 in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #20 0x7ff7f7148941 in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #21 0x7ff7f7148941 in std::thread::lifecycle::spawn_unchecked::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:90
        #22 0x7ff7f7148941 in core::ops::function::FnOnce::call_once<std::thread::lifecycle::spawn_unchecked::closure_env$1<test::run_test::closure_env$1,tuple$<> >,tuple$<> > /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #23 0x7ff7f72b2357 in alloc::boxed::impl$31::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\alloc\src\boxed.rs:2206
        #24 0x7ff7f72b2357 in std::sys::thread::windows::impl$0::new::thread_start /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\thread\windows.rs:59
        #25 0x7ffdeafcd19c in asan_thread_start D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win.cpp:170
        #26 0x7ffeb7e7e8d6  (C:\WINDOWS\System32\KERNEL32.DLL+0x18002e8d6)
        #27 0x7ffeb9acc53b  (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18008c53b)
    
    0x1201608ae173 is located 0 bytes after 35-byte region [0x1201608ae150,0x1201608ae173)
    allocated by thread T7 here:
        #0 0x7ffdeafbac48 in RtlAllocateHeap D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:1476
        #1 0x7ff7f727de75 in alloc::alloc::alloc C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\alloc.rs:178
        #2 0x7ff7f727de75 in alloc::alloc::Global::alloc_impl C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\alloc.rs:190
        #3 0x7ff7f727e5ba in <alloc::alloc::Global as core::alloc::Allocator>::allocate_zeroed C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\alloc.rs:257
        #4 0x7ff7f727d822 in <alloc::raw_vec::RawVecInner>::try_allocate_in C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\raw_vec\mod.rs:470
        #5 0x7ff7f722c6c3 in alloc::raw_vec::RawVecInner<alloc::alloc::Global>::with_capacity_zeroed_in C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\raw_vec\mod.rs:443
        #6 0x7ff7f722c6c3 in alloc::raw_vec::RawVec<u8,alloc::alloc::Global>::with_capacity_zeroed_in C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\raw_vec\mod.rs:208
        #7 0x7ff7f722c6c3 in <u8 as alloc::vec::spec_from_elem::SpecFromElem>::from_elem::<alloc::alloc::Global> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\vec\spec_from_elem.rs:51
        #8 0x7ff7f7183679 in alloc::vec::from_elem::<u8> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc\src\vec\mod.rs:3563
        #9 0x7ff7f7065925 in patina_acpi::acpi::tests::mock_rsdp C:\src\patina\components\patina_acpi\src\acpi.rs:1212
        #10 0x7ff7f706e8f4 in patina_acpi::acpi::tests::test_get_xsdt_address C:\src\patina\components\patina_acpi\src\acpi.rs:1287
        #11 0x7ff7f70f3da7 in patina_acpi::acpi::tests::test_get_xsdt_address::{closure#0} C:\src\patina\components\patina_acpi\src\acpi.rs:1247
        #12 0x7ff7f70d5f71 in <patina_acpi::acpi::tests::test_get_xsdt_address::{closure#0} as core::ops::function::FnOnce<()>>::call_once C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
        #13 0x7ff7f713779f in core::ops::function::FnOnce::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #14 0x7ff7f713779f in test::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,alloc::string::String> >,enum2$<core::result::Result<tuple$<>,alloc::string::String> > (*)()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:663
        #15 0x7ff7f7144f5c in test::run_test_in_process::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #16 0x7ff7f7144f5c in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #17 0x7ff7f7144f5c in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #18 0x7ff7f7144f5c in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #19 0x7ff7f7144f5c in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #20 0x7ff7f7144f5c in test::run_test_in_process /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #21 0x7ff7f7144f5c in test::run_test::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:607
        #22 0x7ff7f713f29b in test::run_test::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:637
        #23 0x7ff7f713f29b in std::sys::backtrace::__rust_begin_short_backtrace::<test::run_test::{closure#1}, ()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\backtrace.rs:160
        #24 0x7ff7f7148941 in std::thread::lifecycle::spawn_unchecked::closure$1::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:92
        #25 0x7ff7f7148941 in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #26 0x7ff7f7148941 in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #27 0x7ff7f7148941 in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #28 0x7ff7f7148941 in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #29 0x7ff7f7148941 in std::thread::lifecycle::spawn_unchecked::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:90
        #30 0x7ff7f7148941 in core::ops::function::FnOnce::call_once<std::thread::lifecycle::spawn_unchecked::closure_env$1<test::run_test::closure_env$1,tuple$<> >,tuple$<> > /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #31 0x7ff7f72b2357 in alloc::boxed::impl$31::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\alloc\src\boxed.rs:2206
        #32 0x7ff7f72b2357 in std::sys::thread::windows::impl$0::new::thread_start /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\thread\windows.rs:59
        #33 0x7ffdeafcd19c in asan_thread_start D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win.cpp:170
        #34 0x7ffeb7e7e8d6  (C:\WINDOWS\System32\KERNEL32.DLL+0x18002e8d6)
        #35 0x7ffeb9acc53b  (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18008c53b)
    
    Thread T7 created by T0 here:
        #0 0x7ffdeafcd597 in CreateThread D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win.cpp:228
        #1 0x7ff7f729c7b6 in <std::sys::thread::windows::Thread>::new /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\thread\windows.rs:32
        #2 0x7ff7f714ba29 in std::thread::lifecycle::spawn_unchecked /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:138
        #3 0x7ff7f714ba29 in std::thread::builder::Builder::spawn_unchecked /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\builder.rs:265
        #4 0x7ff7f714ba29 in std::thread::builder::Builder::spawn /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\builder.rs:194
        #5 0x7ff7f714ba29 in test::run_test /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:637
        #6 0x7ff7f7163685 in test::run_tests /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:447
        #7 0x7ff7f7163685 in test::console::run_tests_console /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\console.rs:327
        #8 0x7ff7f714d6a4 in test::test_main_with_exit_callback /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:160
        #9 0x7ff7f714d6a4 in test::test_main /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:101
        #10 0x7ff7f7149a02 in test::test_main_static /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:183
        #11 0x7ff7f7113d34 in patina_acpi::main C:\src\patina\components\patina_acpi\src\lib.rs:1
        #12 0x7ff7f70d531a in <fn() as core::ops::function::FnOnce<()>>::call_once C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
        #13 0x7ff7f70e7f8d in std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\backtrace.rs:160
        #14 0x7ff7f70a0dcc in std::rt::lang_start::<()>::{closure#0} C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:206
        #15 0x7ff7f72ab03e in core::ops::function::impls::impl$2::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:287
        #16 0x7ff7f72ab03e in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #17 0x7ff7f72ab03e in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #18 0x7ff7f72ab03e in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #19 0x7ff7f72ab03e in std::rt::lang_start_internal::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\rt.rs:175
        #20 0x7ff7f72ab03e in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #21 0x7ff7f72ab03e in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #22 0x7ff7f72ab03e in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #23 0x7ff7f72ab03e in std::rt::lang_start_internal /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\rt.rs:171
        #24 0x7ff7f70a0d2c in std::rt::lang_start::<()> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:205
        #25 0x7ff7f7113d58 in main (C:\src\patina\target\x86_64-pc-windows-msvc\debug\deps\patina_acpi-aff837649f2acbca.exe+0x1400b3d58)
        #26 0x7ff7f72cad2f in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
        #27 0x7ff7f72cad2f in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
        #28 0x7ffeb7e7e8d6  (C:\WINDOWS\System32\KERNEL32.DLL+0x18002e8d6)
        #29 0x7ffeb9acc53b  (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18008c53b)
    
    SUMMARY: AddressSanitizer: heap-buffer-overflow C:\src\patina\components\patina_acpi\src\acpi_table.rs:292 in <patina_acpi::acpi_table::AcpiTableHeader as core::clone::Clone>::clone
    Shadow bytes around the buggy address:
      0x1201608ade80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x1201608adf00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x1201608adf80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x1201608ae000: fa fa 00 00 00 00 00 00 fa fa 00 00 00 00 04 fa
      0x1201608ae080: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00 04 fa
    =>0x1201608ae100: fa fa 00 00 00 00 04 fa fa fa 00 00 00 00[03]fa
      0x1201608ae180: fa fa 00 00 00 00 04 fa fa fa fd fd fd fd fd fd
      0x1201608ae200: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
      0x1201608ae280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x1201608ae300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
      0x1201608ae380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
    Shadow byte legend (one shadow byte represents 8 application bytes):
      Addressable:           00
      Partially addressable: 01 02 03 04 05 06 07 
      Heap left redzone:       fa
      Freed heap region:       fd
      Stack left redzone:      f1
      Stack mid redzone:       f2
      Stack right redzone:     f3
      Stack after return:      f5
      Stack use after scope:   f8
      Global redzone:          f9
      Global init order:       f6
      Poisoned by user:        f7
      Container overflow:      fc
      Array cookie:            ac
      Intra object redzone:    bb
      ASan internal:           fe
      Left alloca redzone:     ca
      Right alloca redzone:    cb
    ==54216==ABORTING
    error: test failed, to rerun pass `-p patina_acpi --lib`
    

    Address Sanitizer output before **patina_acpi: Fix stack buffer access in ACPI tests** commit:

    ==56540==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x0020413fbc64 at pc 0x7ffdeafb6437 bp 0x0020413fb580 sp 0x0020413fad10
    READ of size 101 at 0x0020413fbc64 thread T6
        #0 0x7ffdeafb6436 in __asan_memcpy D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_interceptors_memintrinsics.cpp:64
        #1 0x7ff7f6c40699 in core::ptr::copy_nonoverlapping C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ptr\mod.rs:547
        #2 0x7ff7f6c40699 in <patina_acpi::acpi_table::AcpiTable>::new_from_ptr C:\src\patina\components\patina_acpi\src\acpi_table.rs:472
        #3 0x7ff7f6b9be8a in <patina_acpi::acpi_table::AcpiTable>::new::<patina_acpi::acpi_table::AcpiTableHeader> C:\src\patina\components\patina_acpi\src\acpi_table.rs:428
        #4 0x7ff7f6b839ff in patina_acpi::acpi::tests::test_get_table_at_idx_basic C:\src\patina\components\patina_acpi\src\acpi.rs:1514
        #5 0x7ff7f6c01ca7 in patina_acpi::acpi::tests::test_get_table_at_idx_basic::{closure#0} C:\src\patina\components\patina_acpi\src\acpi.rs:1506
        #6 0x7ff7f6be41e1 in <patina_acpi::acpi::tests::test_get_table_at_idx_basic::{closure#0} as core::ops::function::FnOnce<()>>::call_once C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
        #7 0x7ff7f6c455bf in core::ops::function::FnOnce::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #8 0x7ff7f6c455bf in test::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,alloc::string::String> >,enum2$<core::result::Result<tuple$<>,alloc::string::String> > (*)()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:663
        #9 0x7ff7f6c52d7c in test::run_test_in_process::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #10 0x7ff7f6c52d7c in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #11 0x7ff7f6c52d7c in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #12 0x7ff7f6c52d7c in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #13 0x7ff7f6c52d7c in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #14 0x7ff7f6c52d7c in test::run_test_in_process /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:686
        #15 0x7ff7f6c52d7c in test::run_test::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:607
        #16 0x7ff7f6c4d0bb in test::run_test::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:637
        #17 0x7ff7f6c4d0bb in std::sys::backtrace::__rust_begin_short_backtrace::<test::run_test::{closure#1}, ()> /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\backtrace.rs:160
        #18 0x7ff7f6c56761 in std::thread::lifecycle::spawn_unchecked::closure$1::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:92
        #19 0x7ff7f6c56761 in core::panic::unwind_safe::impl$25::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\panic\unwind_safe.rs:274
        #20 0x7ff7f6c56761 in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #21 0x7ff7f6c56761 in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #22 0x7ff7f6c56761 in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #23 0x7ff7f6c56761 in std::thread::lifecycle::spawn_unchecked::closure$1 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:90
        #24 0x7ff7f6c56761 in core::ops::function::FnOnce::call_once<std::thread::lifecycle::spawn_unchecked::closure_env$1<test::run_test::closure_env$1,tuple$<> >,tuple$<> > /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:250
        #25 0x7ff7f6dbfc17 in alloc::boxed::impl$31::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\alloc\src\boxed.rs:2206
        #26 0x7ff7f6dbfc17 in std::sys::thread::windows::impl$0::new::thread_start /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\thread\windows.rs:59
        #27 0x7ffdeafcd19c in asan_thread_start D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win.cpp:170
        #28 0x7ffeb7e7e8d6  (C:\WINDOWS\System32\KERNEL32.DLL+0x18002e8d6)
        #29 0x7ffeb9acc53b  (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18008c53b)
    
    Address 0x0020413fbc64 is located in stack of thread T6 at offset 324 in frame
        #0 0x7ff7f6b9bb9f in <patina_acpi::acpi_table::AcpiTable>::new::<patina_acpi::acpi_table::AcpiTableHeader> C:\src\patina\components\patina_acpi\src\acpi_table.rs:422
    
      This frame has 5 object(s):
        [32, 48) '_14' (line 428)
        [64, 88) '_13' (line 428)
        [128, 168) '_5' (line 424)
        [208, 248) '_4' (line 424)
        [288, 324) 'table1' (line 424) <== Memory access at offset 324 overflows this variable
    HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
          (longjmp, SEH and C++ exceptions *are* supported)
    Thread T6 created by T0 here:
        #0 0x7ffdeafcd597 in CreateThread D:\a\_work\1\s\src\vctools\asan\llvm\compiler-rt\lib\asan\asan_win.cpp:228
        #1 0x7ff7f6daa076 in <std::sys::thread::windows::Thread>::new /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\sys\thread\windows.rs:32
        #2 0x7ff7f6c59849 in std::thread::lifecycle::spawn_unchecked /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\lifecycle.rs:138
        #3 0x7ff7f6c59849 in std::thread::builder::Builder::spawn_unchecked /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\builder.rs:265
        #4 0x7ff7f6c59849 in std::thread::builder::Builder::spawn /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\thread\builder.rs:194
        #5 0x7ff7f6c59849 in test::run_test /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:637
        #6 0x7ff7f6c714a5 in test::run_tests /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:447
        #7 0x7ff7f6c714a5 in test::console::run_tests_console /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\console.rs:327
        #8 0x7ff7f6c5b4c4 in test::test_main_with_exit_callback /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:160
        #9 0x7ff7f6c5b4c4 in test::test_main /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:101
        #10 0x7ff7f6c57822 in test::test_main_static /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\test\src\lib.rs:183
        #11 0x7ff7f6c21b74 in patina_acpi::main C:\src\patina\components\patina_acpi\src\lib.rs:1
        #12 0x7ff7f6be34ea in <fn() as core::ops::function::FnOnce<()>>::call_once C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
        #13 0x7ff7f6bf5efd in std::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\backtrace.rs:160
        #14 0x7ff7f6baef9c in std::rt::lang_start::<()>::{closure#0} C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:206
        #15 0x7ff7f6db88fe in core::ops::function::impls::impl$2::call_once /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\core\src\ops\function.rs:287
        #16 0x7ff7f6db88fe in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #17 0x7ff7f6db88fe in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #18 0x7ff7f6db88fe in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #19 0x7ff7f6db88fe in std::rt::lang_start_internal::closure$0 /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\rt.rs:175
        #20 0x7ff7f6db88fe in std::panicking::catch_unwind::do_call /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:581
        #21 0x7ff7f6db88fe in std::panicking::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panicking.rs:544
        #22 0x7ff7f6db88fe in std::panic::catch_unwind /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\panic.rs:359
        #23 0x7ff7f6db88fe in std::rt::lang_start_internal /rustc/f5209000832c9d3bc29c91f4daef4ca9f28dc797/library\std\src\rt.rs:171
        #24 0x7ff7f6baeefc in std::rt::lang_start::<()> C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\rt.rs:205
        #25 0x7ff7f6c21b98 in main (C:\src\patina\target\x86_64-pc-windows-msvc\debug\deps\patina_acpi-aff837649f2acbca.exe+0x1400b1b98)
        #26 0x7ff7f6dd85ef in invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
        #27 0x7ff7f6dd85ef in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
        #28 0x7ffeb7e7e8d6  (C:\WINDOWS\System32\KERNEL32.DLL+0x18002e8d6)
        #29 0x7ffeb9acc53b  (C:\WINDOWS\SYSTEM32\ntdll.dll+0x18008c53b)
    
    SUMMARY: AddressSanitizer: stack-buffer-overflow C:\Users\mikuback\.rustup\toolchains\nightly-2025-12-12-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ptr\mod.rs:547 in core::ptr::copy_nonoverlapping
    Shadow bytes around the buggy address:
      0x0020413fb980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0020413fba00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0020413fba80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0020413fbb00: 00 00 00 00 f1 f1 f1 f1 f8 f8 f2 f2 00 00 00 f2
      0x0020413fbb80: f2 f2 f2 f2 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f8 f8
    =>0x0020413fbc00: f8 f8 f8 f2 f2 f2 f2 f2 00 00 00 00[04]f3 f3 f3
      0x0020413fbc80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
      0x0020413fbd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      0x0020413fbd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f8 f2 f8 f2
      0x0020413fbe00: f8 f2 f8 f2 f8 f2 f8 f2 f8 f2 f8 f8 f8 f2 f2 f2
      0x0020413fbe80: f2 f2 f8 f8 f8 f8 f8 f2 f2 f2 f2 f2 f8 f8 f8 f2
    Shadow byte legend (one shadow byte represents 8 application bytes):
      Addressable:           00
      Partially addressable: 01 02 03 04 05 06 07 
      Heap left redzone:       fa
      Freed heap region:       fd
      Stack left redzone:      f1
      Stack mid redzone:       f2
      Stack right redzone:     f3
      Stack after return:      f5
      Stack use after scope:   f8
      Global redzone:          f9
      Global init order:       f6
      Poisoned by user:        f7
      Container overflow:      fc
      Array cookie:            ac
      Intra object redzone:    bb
      ASan internal:           fe
      Left alloca redzone:     ca
      Right alloca redzone:    cb
    ==56540==ABORTING
    error: test failed, to rerun pass `-p patina_acpi --lib`
    
      </blockquote>
      <hr>
    </details>
    
  • patina\_dxe\_core: Fix invalid access in test\_fv\_functionality() @makubacki (#1366)
    Change Details
      ## Description

    The test_fv_functionality() test created an invalid firmware volume base address by adding 0x1000 to a protocol interface pointer:

    /* Corrupt the base address to cover error conditions  */
    let base_no2: u64 = fv_interface3.as_mut() as *mut _ as u64 + 0x1000;

    This produced an address pointing into unrelated memory.

    A read from that address is attempted later in a call stack starting from fv_get_volume_attributes_efiapi():

    • test_fv_functionality() calls fv_get_volume_attributes_efiapi(fv_ptr3_const, fv_attributes)
    • fv_get_volume_attributes_efiapi() calls into fv_get_volume_attributes()
    • fv_get_volume_attributes() calls VolumeRef::new_from_address(physical_address)
    • VolumeRef::new_from_address() does ptr::read_unaligned(base_address as *const fv::Header)

    This change updates the test to avoid reading from an arbitrary invalid address, replacing it with a pointer to a leaked buffer of zeros.

    The buffer is sized to hold an fv::Header. Since the buffer is filled with zeros, it does not contain a valid _FVH signature, so the signature check fails and returns DataCorrupt as the test expects.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • N/A


📖 Documentation Updates

  • patina\_test: Better support multiple TestRunners @Javagedes (#1360)
    Change Details
      ## Description

    patina_test has always supported multiple TestRunner components to easily group tests together and have them executed. With the addition of different test triggers (such as test execution on specific UEFI events), the existing architecture has broken down. While it works, tests are currently executed more than expected (e.g. each TestRunner will run the test if there is an overlap in test cases). Additionally test result reporting is also logged per TestRunner but reports the total culmination of all tests executed.

    This commit represents a large rework to resolve these issues by moving test management and execution to a private service while each TestRunner component is only responsible for registering tests with the single underlying service.

    This impact of this commit is that each test is now only registered once, even if multiple TestRunner components specify the test case. Additionally, test reporting is now done by the underlying service, which prevents test results being reported multiple times. Additionally, Immediate (now Manual) tests were originally run during component execution. This has been pushed off to Ready to Boot and Exit Boot Services to allow all components to execute. Finally, each component may register its own test error handler. With these changes, if a test failure occurs, any TestRunner that registered that test to run, will have its handler executed.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    Registered multiple TestRunner components with various scenarios and verified that:

    1. All test handler failures are executed
    2. Each test is only executed once regarldess of how many TestRunner components include the test in it's scope.
    3. Tests based off of events or timers only execute once per trigger, rather than once per TestRunner per trigger.

    Integration Instructions

    N/A




  • Add Patina QEMU PR Validation Workflow docs @makubacki (#1362)
    Change Details
      ## Description

    Adds documents to explain the design of the QEMU PR Validation workflow used in the patina repository.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • cargo make all

    Integration Instructions

    • N/A


  • Short doc update on ACPI progress @berlin-with0ut-return (#1327)
    Change Details
      ## Description Include current status of ACPI in README.
    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    N/A.

    Integration Instructions

    N/A.




  • Docs: Update install command for UefiExt.dll @cfernald (#1355)
    Change Details
      ## Description

    Updates docs for quick UefiExt install command to reflect the added script in microsoft/uefi_debug_tools#22.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    N/A

    Integration Instructions

    N/A




  • RFC Amendment: Major branch evaluation @makubacki (#1345)
    Change Details
      ## Description

    Update the Patina Release Process RFC to indicate that the "major branch" process is being evaluated in Patina.

    • Impacts functionality?
    • Impacts security?
    • Breaking change?
    • Includes tests?
    • Includes documentation?

    How This Was Tested

    • CI

    Integration Instructions

    • N/A


Full Changelog: patina-v20.0.3...v20.1.0