From 314a91a726cb5d947c5e19268a8fa557d803389c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 26 Oct 2023 17:12:31 +0300 Subject: Fix crash due to dereferencing of available package NULL pointer in trace lambda --- bpkg/pkg-build.cxx | 5 ++--- tests/pkg-build.testscript | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 5c41204..c531480 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -6440,9 +6440,8 @@ namespace bpkg for (const auto& c: ud->ignored_constraints) { - l5 ([&]{trace << "while configuring dependent " - << p.available_name_version_db () - << " in simulation mode unconstrain (" + l5 ([&]{trace << "while configuring dependent " << p.name () + << p.db << " in simulation mode unconstrain (" << c.dependency << ' ' << c.constraint << ')';}); deps.emplace_back (c.dependency); diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index eec268e..aa99056 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -9647,7 +9647,7 @@ test.arguments += --sys-no-query trace: collect_build_postponed (0): end trace: execute_plan: simulate: yes %.* - trace: execute_plan: while configuring dependent tez/1.0.0 in simulation mode unconstrain (toz == 0.1.0) + trace: execute_plan: while configuring dependent tez in simulation mode unconstrain (toz == 0.1.0) %.* error: unable to satisfy constraints on package toz info: tvz/1.0.0 depends on (toz == 0.2.0) @@ -9841,7 +9841,7 @@ test.arguments += --sys-no-query trace: collect_build_postponed (0): end trace: execute_plan: simulate: yes %.* - trace: execute_plan: while configuring dependent tez/1.0.0 in simulation mode unconstrain (toz == 0.1.0) + trace: execute_plan: while configuring dependent tez in simulation mode unconstrain (toz == 0.1.0) %.* error: unable to satisfy constraints on package toz info: tvz/0.1.0 depends on (toz == 0.2.0) -- cgit v1.1