On Wed, 2013-11-20 at 20:32 +0100, Jan Kratochvil wrote:
The problem is that:
* elfutils will find a completely different version of file with the same name
* the file has build-id
* as the file is different the computed memory address of the build-id is bogus
* bogus address is sure not available from the core file
* elfutils thinks just that the core file was dumped without first ELF page
therefore elfutils approves the file matching as valid.
Nice explanation. Thanks.
But as elfutils scans the memory space and finds there files by their
it can verify build-id of the found disk file vs. that in-memory file.
This will make all the tests of the initial patch PASSing again.
Verify file vs. core build-id, when both available
2013-11-20 Jan Kratochvil <jan.kratochvil(a)redhat.com>
* dwfl_segment_report_module.c (dwfl_segment_report_module): New
variable close_elf. Call __libdwfl_find_elf_build_id and compare the
content, if possible.
Yes, looks good.