Comment 0 for bug 1968742

Revision history for this message
Mark A. Grondona (mgrondona) wrote : hwloc 2.7.0 putenv of static string

libhwloc from hwloc-2.7.0-2 has a bug in which putenv() is used on a static string in a library constructor. This can cause a segv in an unrelated application if the application tries to modify the environment, or if in this case libhwloc.so is unloaded by the dynamic linker.

There is already a fix upstream which went into hwloc 2.7.1, which uses setenv(3) instead of putenv(3). Can this fix be backported to the package in Ubuntu 22.04?

$ lsb_release -rd
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04

$ apt-cache policy hwloc
hwloc:
  Installed: (none)
  Candidate: 2.7.0-2
  Version table:
     2.7.0-2 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

Upstream fix:
https://github.com/open-mpi/hwloc/commit/91b9e44910f4fe4fb420a4064a646e2247c6de0e