[PATCH] Don't return the main file as the separate debug info

Alan Modra amodra@gmail.com
Sat Dec 11 00:11:39 GMT 2021


On Fri, Dec 10, 2021 at 01:48:39PM -0800, H.J. Lu wrote:
> Return NULL if the separate debug info is the same as the input main
> file to avoid infinite recursion.

Your backtrace says it's actually the separate debug info file
pointing to itself, not to the main file.

> 	PR binutils/28679
> 	* dwarf.c (load_separate_debug_info): Don't return the input
> 	main file.

You missed two places where canon_filename should be freed when
returning NULL.  OK with those fixed.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list