Always cleanup on exit from ML_(read_elf_object)
commita0d555a0dfe078ef04ea49d991a8090ab14bd4a5
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 19 Aug 2023 19:37:33 +0000 (19 21:37 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 19 Aug 2023 19:37:33 +0000 (19 21:37 +0200)
tree63bd7a6c81d7c91b1cc6854ffde7fbd9e04cce08
parent639fa4053d8ef97bd211dc541029622ce86dd6fc
Always cleanup on exit from ML_(read_elf_object)

I'm still a but baffled as to why this wasn't seen earlier.
A FreeBSD testcase started failing with kernel 13.2 patch 2,
which is quite a minor change. The testcase gets an fd from
pdfork and the parent does a printf with the fd then zaps the
process with pdkill. Standalone the fd is 3, and that's what
the expected contains. However, when it started failing I saw
with lsof that fds 3 and 4 were associated with the guest exe
and ld-elf.so.1.
coregrind/m_debuginfo/readelf.c