[Ada] Robustify traceback caching for executable in current dir
Any program calling Gnat.Traceback.Symbolic.Enable_Cache for dwarf based symbolization fails with a segmentation violation when spawned with an inaccurate argv[0] such that it couldn't be found on PATH. argv[0] is most often found on PATH. One plausible case where it isn't is when argv[0] is a mere file name and . isn't on PATH, which might happen out of imprecise exec calls. This change robustifies the Traceback.Symbolic implementation to work in this case as well, by just trying to work with argv[0] untouched as the executable file to fetch dwarf info from. 2018-05-21 Olivier Hainque <hainque@adacore.com> gcc/ada/ * libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead of empty string when argv[0] couldn't be found on PATH. (Enable_Cache): Raise Program_Error instead of attempting a null pointer dereference when the Exec_Module initialization failed. From-SVN: r260456
Showing
Please
register
or
sign in
to comment