softhsm: add destroyed global access prevention patch

Currently softhsm will try to access deleted obejcts due to the order of
atexit handler implementations. Add a patch which adds a global variable
to track whether objects are deleted and prevents access if this is the
case.

This fixes a failure with the signing.bbclass where when signing
multiple fitimage configurations the second signing operation will lead
to a segfault.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Rouven Czerwinski authored and Khem Raj committed 2024-09-27 10:08:14 -07:00
1 parent 83688fdf74
commit c563d3e83d
2 files changed
+673

No files matched your search

@@ -7,6 +7,7 @@ DEPENDS = "sqlite3"
SRC_URI = "https://dist.opendnssec.org/source/softhsm-2.6.1.tar.gz \
file://0001-avoid-unnecessary-check-for-sqlite3-binary.patch \
file://0002-Prevent-accessing-of-global-c-objects-once-they-are-.patch \
"
SRC_URI[sha256sum] = "61249473054bcd1811519ef9a989a880a7bdcc36d317c9c25457fc614df475f2"