<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16010</bug_id>
          
          <creation_ts>2025-10-15 19:48:11 +0000</creation_ts>
          <short_desc>libsolv segfaults when pooling IPK with large number of dependencies.</short_desc>
          <delta_ts>2026-10-02 06:45:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.7.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>next-patch</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Baryshkov">dbaryshkov</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          <cc>peter.marko</cc>
    
    <cc>quaresma.jose</cc>
    
    <cc>reatmon</cc>
    
    <cc>tom.hancock</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102945</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Baryshkov">dbaryshkov</who>
    <bug_when>2025-10-15 19:48:11 +0000</bug_when>
    <thetext>opkg crashes when building one of the meta-qcom initramfs images. Currently it shows only under kas-container builds.


DL_DIR=/home/lumag/Projects/OE-downloads/ KAS_TARGET=initramfs-firmware-sm8650-hdk-image kas-container build meta-qcom/ci/mirror.yml:meta-qcom/ci/qcom-armv8a.yml:meta-qcom/ci/qcom-distro.yml:meta-qcom/ci/linux-yocto-dev.yml:meta-qcom/ci/initramfs-test.yml
2025-10-15 22:44:11 - INFO     - kas 4.8.2 started
2025-10-15 22:44:11 - INFO     - Using /repo as root for repository meta-qcom
2025-10-15 22:44:11 - INFO     - Repository oe-core already contains master as commit
2025-10-15 22:44:11 - INFO     - Repository bitbake already contains master as commit
2025-10-15 22:44:11 - INFO     - Repository meta-yocto already contains master as commit
2025-10-15 22:44:11 - INFO     - Repository meta-qcom-distro already contains main as commit
2025-10-15 22:44:11 - INFO     - Repository meta-openembedded already contains master as commit
2025-10-15 22:44:11 - INFO     - Repository meta-virtualization already contains master as commit
2025-10-15 22:44:11 - INFO     - Repository meta-audioreach already contains main as commit
2025-10-15 22:44:11 - INFO     - Repository oe-core checked out to 5965ae92c866817a0bab54d240b1d197da37df2a
2025-10-15 22:44:11 - INFO     - Repository bitbake checked out to 8b582ef8dd0cef0192d4c0104bcd9b5d642d132c
2025-10-15 22:44:11 - INFO     - Repository meta-yocto checked out to fe65e142d0d9ba0e51ff9175ffa82e902f982a20
2025-10-15 22:44:11 - INFO     - Repository meta-qcom-distro checked out to 0c7c547bc1066f9f5e145aff9868fd48922d7bf9
2025-10-15 22:44:11 - INFO     - Repository meta-openembedded checked out to e1915f54f1db1208152148973e9965570972bbc7
2025-10-15 22:44:11 - INFO     - Repository meta-virtualization checked out to 437efd9259c1786c130c724290cb1e46d50edcb2
2025-10-15 22:44:11 - INFO     - Repository meta-audioreach checked out to fdb558e149c366fe34334b3e63612d1729e8a3df
2025-10-15 22:44:11 - INFO     - /work/build$ /work/bitbake/bin/bitbake -c build initramfs-firmware-sm8650-hdk-image
Loading cache: 100% |#########################################################################################################################################| Time: 0:00:01
Loaded 5654 entries from dependency cache.
Parsing recipes: 100% |#######################################################################################################################################| Time: 0:00:00
Parsing of 3465 .bb files complete (3461 cached, 4 parsed). 5657 targets, 192 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = &quot;2.15.2&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;universal&quot;
TARGET_SYS           = &quot;aarch64-qcom-linux&quot;
MACHINE              = &quot;qcom-armv8a&quot;
DISTRO               = &quot;qcom-distro&quot;
DISTRO_VERSION       = &quot;2.0&quot;
TUNE_FEATURES        = &quot;aarch64 armv8a crc&quot;
TARGET_FPU           = &quot;&quot;
meta-audioreach      = &quot;main:fdb558e149c366fe34334b3e63612d1729e8a3df&quot;
meta-filesystems     
meta-gnome           
meta-multimedia      
meta-networking      
meta-oe              
meta-python          
meta-xfce            = &quot;master:e1915f54f1db1208152148973e9965570972bbc7&quot;
repo                 = &quot;HEAD:f3df40e147f39d4e159c9368a6fcce3ad15a9a6f&quot;
meta-qcom-distro     = &quot;main:0c7c547bc1066f9f5e145aff9868fd48922d7bf9&quot;
meta-virtualization  = &quot;master:437efd9259c1786c130c724290cb1e46d50edcb2&quot;
meta-poky            = &quot;master:fe65e142d0d9ba0e51ff9175ffa82e902f982a20&quot;
meta                 = &quot;master:5965ae92c866817a0bab54d240b1d197da37df2a&quot;

Sstate summary: Wanted 404 Local 398 Mirrors 0 Missed 6 Current 1699 (98% match, 99% complete)##################################################              | ETA:  0:00:00
Removing 8 stale sstate objects for arch qcom_armv8a: 100% |##################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
ERROR: initramfs-firmware-sm8650-hdk-image-1.0-r0 do_rootfs: Unable to install packages. Command &apos;/work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/opkg.conf -t /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/temp/ipktemp/ -o /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/rootfs  --force-postinstall --prefer-arch-to-version   install packagegroup-sm8650-hdk-firmware&apos; returned -11:

ERROR: Logfile of failure stored in: /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/temp/log.do_rootfs.739
ERROR: Task (/work/build/../../repo/recipes-bsp/images/initramfs-firmware-sm8650-hdk-image.bb:do_rootfs) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 4592 tasks of which 4589 didn&apos;t need to be rerun and 1 failed.
NOTE: Build completion summary:
NOTE:   do_create_spdx: 100.0% sstate reuse(1 setscene, 0 scratch)
NOTE:   do_create_package_spdx: 100.0% sstate reuse(1 setscene, 0 scratch)
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds

Summary: 1 task failed:
  /work/build/../../repo/recipes-bsp/images/initramfs-firmware-sm8650-hdk-image.bb:do_rootfs
    log: /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/temp/log.do_rootfs.739
Summary: There was 1 ERROR message, returning a non-zero exit code.
2025-10-15 22:44:37 - ERROR    - Command &quot;/work/bitbake/bin/bitbake -c build initramfs-firmware-sm8650-hdk-image&quot; failed with error 1



Running the command inside the container under valgrind produces the following trace (and makes it work):

$ valgrind /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg --volatile-
cache -f /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/opkg.conf -t /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm86
50-hdk-image/1.0/temp/ipktemp/ -o /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/rootfs  --force-postinstall --prefer-arch-to-version   
install packagegroup-sm8650-hdk-firmware
==483== Memcheck, a memory error detector
==483== Copyright (C) 2002-2022, and GNU GPL&apos;d, by Julian Seward et al.
==483== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==483== Command: /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/opkg.conf -t /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/temp/ipktemp/ -o /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/rootfs --force-postinstall --prefer-arch-to-version install packagegroup-sm8650-hdk-firmware
==483==
==483== Invalid read of size 1
==483==    at 0x4B50D20: stringpool_strn2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B4A3DB: pool_str2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x487936C: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x487A17C: opkg_solver_install (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865731: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865DB1: opkg_cmd_exec (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x10AA4C: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg)
==483==    by 0x48AFF67: (below main) (in /work/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6)
==483==  Address 0xe1b5728 is 219,928 bytes inside a block of size 458,752 free&apos;d
==483==    at 0x484C82F: realloc (vg_replace_malloc.c:1437)
==483==    by 0x4B835FD: solv_realloc (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B50C86: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B50F26: stringpool_strn2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B4A3DB: pool_str2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x487936C: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x487A17C: opkg_solver_install (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865731: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865DB1: opkg_cmd_exec (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x10AA4C: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg)
==483==    by 0x48AFF67: (below main) (in /work/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6)
==483==  Block was alloc&apos;d at
==483==    at 0x484C82F: realloc (vg_replace_malloc.c:1437)
==483==    by 0x4B835FD: solv_realloc (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B50EF4: stringpool_strn2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x4B4A3DB: pool_str2id (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libsolv.so.1)
==483==    by 0x48783F5: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4878604: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x487999A: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x487A0C0: opkg_solver_install (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865731: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x4865DB1: opkg_cmd_exec (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/lib/libopkg.so.1.0.0)
==483==    by 0x10AA4C: ??? (in /work/build/tmp/work/qcom_armv8a-qcom-linux/initramfs-firmware-sm8650-hdk-image/1.0/recipe-sysroot-native/usr/bin/opkg)
==483==    by 0x48AFF67: (below main) (in /work/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6)
==483==</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102947</commentid>
    <comment_count>1</comment_count>
    <who name="Jose Quaresma">quaresma.jose</who>
    <bug_when>2025-10-16 13:56:35 +0000</bug_when>
    <thetext>I finished the bisect and the issue becomes in https://git.openembedded.org/openembedded-core/commit/?id=9b883aa6f3cf881bfd60442b9ec193ae191b4cbe

This includes a big refactor of the linux-firmware.

We currently have the opkg 0.7.0 in oe-core but a new 0.9.0 is available. I have updated the opkg to v0.9.0 and the libsolv to the tip but the libsolv.so.1 segment-fault is still there. In the meantime I will send the opkg bump to 0.9.0 to the oe-core list.

I will continue the debugging and will do a compaction of the linux-firmware refactor using the buildhistory to see the differences in the packages. Looks like this refactor trigger the memory corruption and I believe it can be something on the RDEPENDS that becomes now a little bigger</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102979</commentid>
    <comment_count>2</comment_count>
    <who name="Ryan Eatmon">reatmon</who>
    <bug_when>2025-10-16 16:15:42 +0000</bug_when>
    <thetext>Are you thinking there is an issue with the patch (ie I did something wrong), or that the linux-firmware package now has a very large number of dependencies due to all of the sub packages that it is breaking something in opkg?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102980</commentid>
    <comment_count>3</comment_count>
    <who name="Ryan Eatmon">reatmon</who>
    <bug_when>2025-10-16 16:17:19 +0000</bug_when>
    <thetext>Are you depending on the full linux-firmware package in your image instead of the proper sub package for the firmware you actually need?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102981</commentid>
    <comment_count>4</comment_count>
    <who name="Jose Quaresma">quaresma.jose</who>
    <bug_when>2025-10-16 16:22:27 +0000</bug_when>
    <thetext>I believe more in your suggestion of the linux-firmware package now has a very large number of dependencies due to all of the sub packages that it is breaking something in opkg?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102989</commentid>
    <comment_count>5</comment_count>
    <who name="Jose Quaresma">quaresma.jose</who>
    <bug_when>2025-10-17 14:36:42 +0000</bug_when>
    <thetext>Disabling the libsolv in opkg fixes the segmentfault so I believe the issue is inside the the libsolv.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102998</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2025-10-20 17:57:50 +0000</bug_when>
    <thetext>Thanks for the bug @dmitry. I&apos;ve renamed it to reflect the most-probable root cause, per your investigation. I consider this high-priority, since the internal satisfaction solver (ie. not libsolv) is scheduled to be deprecated sometime soon.

Do you think we might be able to simply reproduce this error outside of the OE build environment by installing that firmware IPK to an offline root?

If that seems likely, could you attach the reproducing IPK to this bug item for whoever takes up a fix?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103012</commentid>
    <comment_count>7</comment_count>
    <who name="Jose Quaresma">quaresma.jose</who>
    <bug_when>2025-10-21 17:33:50 +0000</bug_when>
    <thetext>Disabling the libsolv in opkg fixes the segmentfault but I have now other errors like: &quot;error: opkg_solver_install: Cannot install package&quot;

Do you think we might be able to simply reproduce this error outside of the OE build environment by installing that firmware IPK to an offline root?

 I don&apos;t know what you mean by offline root.

If that seems likely, could you attach the reproducing IPK to this bug item for whoever takes up a fix?

 I can attach the IPK that give us the segment fault if that&apos;s what you&apos;re asking for.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103067</commentid>
    <comment_count>8</comment_count>
    <who name="Jose Quaresma">quaresma.jose</who>
    <bug_when>2025-10-24 13:53:38 +0000</bug_when>
    <thetext>Build opkg without the libsolve fails with errors like:

error: calculate_dependencies_for: Cannot satisfy the following dependencies for packagegroup-base-extended:
        linux-firmware-qcom-qcm6490-audio (&gt;= 1:20251011)       linux-firmware-qcom-qcm6490-compute (&gt;= 1:20251011)

Removing the versioned RDEPENDS (= 1:${PV})&quot; is not enough to make the opkg happy and I have now new type of errors. I&apos;m seeing that opkg only works with libsolve, without it it always breaks in one way or another.
We&apos;re really going to have to fix the libsolve and hope it doesn&apos;t happen again while we work on the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106181</commentid>
    <comment_count>9</comment_count>
    <who name="Tom Hancock">tom.hancock</who>
    <bug_when>2026-07-16 08:55:43 +0000</bug_when>
    <thetext>I&apos;m seeing something very similar with a yocto-based build with a large package list. It looks like a use-after-free in the libsolv solver backend due to a realloc. This patch seemed to resolve it.
Using opkg_0.8.0, it didnt seem to be addressed on latest?
----
diff --git a/libopkg/solvers/libsolv/opkg_solver_libsolv.c b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
index d152174..56fb8e8 100644
--- a/libopkg/solvers/libsolv/opkg_solver_libsolv.c
+++ b/libopkg/solvers/libsolv/opkg_solver_libsolv.c
@@ -791,13 +791,16 @@ static void libsolv_solver_add_job(libsolv_solver_t *libsolv_solver,
     Id what = 0;
     Id how = 0;

+    /* pkg_name may point directly into the pool&apos;s string space */
+    char *name = xstrdup(pkg_name);
+
     if (pkg_version) {
         what = pool_rel2id(libsolv_solver-&gt;pool,
-                           pool_str2id(libsolv_solver-&gt;pool, pkg_name, 1),
+                           pool_str2id(libsolv_solver-&gt;pool, name, 1),
                            pool_str2id(libsolv_solver-&gt;pool, pkg_version, 1),
                            constraint_to_solv_flags(constraint), 1);
     } else {
-        what = pool_str2id(libsolv_solver-&gt;pool, pkg_name, 1);
+        what = pool_str2id(libsolv_solver-&gt;pool, name, 1);
     }

     switch (action) {
@@ -809,7 +820,7 @@ static void libsolv_solver_add_job(libsolv_solver_t *libsolv_solver,
         how = SOLVER_ERASE | SOLVER_SOLVABLE_NAME;
         break;
     case JOB_UPGRADE:
-        if (pkg_name &amp;&amp; strcmp(pkg_name, &quot;&quot;) != 0) {
+        if (name &amp;&amp; strcmp(name, &quot;&quot;) != 0) {
             how = SOLVER_UPDATE | SOLVER_SOLVABLE_PROVIDES | SOLVER_TARGETED;
         } else {
             how = SOLVER_UPDATE | SOLVER_SOLVABLE_REPO;
@@ -817,7 +828,7 @@ static void libsolv_solver_add_job(libsolv_solver_t *libsolv_solver,
         }
         break;
     case JOB_DISTUPGRADE:
-        if (pkg_name &amp;&amp; strcmp(pkg_name, &quot;&quot;) != 0) {
+        if (name &amp;&amp; strcmp(name, &quot;&quot;) != 0) {
             how = SOLVER_DISTUPGRADE | SOLVER_SOLVABLE_PROVIDES | SOLVER_TARGETED;
         } else {
             how = SOLVER_DISTUPGRADE | SOLVER_SOLVABLE_ALL;
@@ -840,6 +851,8 @@ static void libsolv_solver_add_job(libsolv_solver_t *libsolv_solver,
         queue_push2(&amp;libsolv_solver-&gt;solver_jobs,
                     SOLVER_FAVOR | SOLVER_SOLVABLE_NAME, what);
     }
+
+    free(name);
 }

 static void libsolv_print_all_problem_rules(libsolv_solver_t *libsolv_solver, Id problem)
----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106995</commentid>
    <comment_count>10</comment_count>
    <who name="Peter Marko">peter.marko</who>
    <bug_when>2026-10-02 06:45:35 +0000</bug_when>
    <thetext>This should be fixed via https://git.yoctoproject.org/opkg/commit/?id=293e176300a1a52e4aba1ab659dac69248f35760</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>