Created attachment 245034 [details] Add a patch for ifunc_handler The work for simd support uses @gnu_indirect_function. When Valgrind sees binaries using such function it expects to have its own ifunc_handler. Until now there wasn't one for FreeBSD so Valgrind terminates with an abort. This patch merges the fix I made upstream: commit c934430d56c2add25002ea8e321bd8bdab80fc99 Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Thu Aug 31 15:32:21 2023 +0200 Bug 473870 - FreeBSD 14 applications fail early at startup FreeBSD recently started adding some functions using @gnu_indirect_function, specifically strpcmp which was causing this crash. When running and encountering this ifunc Valgrind looked for the ifunc_handler. But there wasn't one for FreeBSD so Valgrind asserted.
^Triage: Please set the maintainer-approval attachment flag (to +) on patches for ports you maintain to signify approval. -- Attachment -> Details -> maintainer-approval [+] Thanks!
Comment on attachment 245034 [details] Add a patch for ifunc_handler Patch based on the upstream fix.
Committed, Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3d864ab9721054806c92c3c0588b8a45f80d8aa2 commit 3d864ab9721054806c92c3c0588b8a45f80d8aa2 Author: Paul Floyd <pjfloyd@wanadoo.fr> AuthorDate: 2023-09-20 07:54:04 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-09-20 11:42:11 +0000 devel/valgrind: patch for ifuncs The work for simd support uses @gnu_indirect_function. When Valgrind sees binaries using such function it expects to have its own ifunc_handler. Until now there wasn't one for FreeBSD so Valgrind terminates with an abort. This patch merges the fix maintainer and creator made upstream. PR: 273955 Reported by: pjfloyd@wanadoo.fr (maintainer) devel/valgrind/Makefile | 28 ++++++++++--------- .../files/patch-coregrind-vg_preloaded.c (new) | 31 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 12 deletions(-)