Skip to content

zynqmp: Fix release-then-use segfault on bootimage import#50

Open
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-release-then-use-segfault
Open

zynqmp: Fix release-then-use segfault on bootimage import#50
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-release-then-use-segfault

Conversation

@bradfa

@bradfa bradfa commented Jul 6, 2026

Copy link
Copy Markdown

The v2026.1 smart-pointer migration replaced raw pointers with unique_ptr, but two spots kept dereferencing a unique_ptr after calling release() on it to hand ownership to a std::list. release() nulls the unique_ptr, so the subsequent field reads deref a null pointer and crash.

This regressed bootgen -arch zynqmp -image <bif> when the BIF contains a [bootimage] partition (e.g. presigned-FSBL flows using -generate_hashes), which worked in v2025.1 with raw pointers.

The v2026.1 smart-pointer migration replaced raw pointers with
unique_ptr, but two spots kept dereferencing a unique_ptr after
calling release() on it to hand ownership to a std::list. release()
nulls the unique_ptr, so the subsequent field reads deref a null
pointer and crash.

This regressed `bootgen -arch zynqmp -image <bif>` when the BIF
contains a [bootimage] partition (e.g. presigned-FSBL flows using
-generate_hashes), which worked in v2025.1 with raw pointers.

Signed-off-by: Andrew Bradford <andrew.bradford@konsulko.com>
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