maintainer-feedback requested: [Bug 284276] ports-mgmt/pkg: pkg-2.0.0 version often segfaults with -o or --origin option

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 22 Jan 2025 20:54:31 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-pkg (Nobody)
<pkg@FreeBSD.org> for maintainer-feedback:
Bug 284276: ports-mgmt/pkg: pkg-2.0.0 version often segfaults with -o or
--origin option
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284276



--- Description ---
Starting from today, after the upgrade to pkg-2.0.0, I'm facing some segfaults
using pkg version with the -o option.
Initially I noticed that because I use the 'pkg version -o -l "<"' every time I
update the ports tree, but later I tested that again and now it seems it is not
happening anymore.

Anyway, the following are quite reproducible:
$ pkg version -o -l ">"
Child process pid=17984 terminated abnormally: Segmentation fault
$ pkg version -o -l "="
Child process pid=57595 terminated abnormally: Segmentation fault
$ pkg version -o
Child process pid=65434 terminated abnormally: Segmentation fault

Omitting the -o option it exits with 0.

As I'm writing this, I ran
# gitup ports && pkg version -o -l "<"
and after a while it exited printing:
Child process pid=66670 terminated abnormally: Segmentation fault
Some files for a port I have installed have been downloaded and now it seems
that running 'pkg version -o' also with '-l "<"' is regularly crashing again.