From: Michal Nowak Date: Tue, 24 Nov 2020 16:39:23 +0000 (+0100) Subject: Write traceback file to the same directory as core file X-Git-Tag: v9.17.8~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6428fc26af232e0954b65347c1a232e203377321;p=thirdparty%2Fbind9.git Write traceback file to the same directory as core file The traceback files could overwrite each other on systems which do not use different core dump file names for different processes. Prevent that by writing the traceback file to the same directory as the core dump file. These changes still do not prevent the operating system from overwriting a core dump file if the same binary crashes multiple times in the same directory and core dump files are named identically for different processes. --- diff --git a/bin/tests/system/run.sh.in b/bin/tests/system/run.sh.in index 481368f9de6..e802332c8cc 100644 --- a/bin/tests/system/run.sh.in +++ b/bin/tests/system/run.sh.in @@ -275,7 +275,7 @@ if [ -n "$core_dumps" ]; then -- \ "$binary" 2>/dev/null | sed -n '/^Core was generated by/,$p' | cat_d echoinfo "D:$systest:--------------------------------------------------------------------------------" - coredump_backtrace=$(basename "${coredump}")-backtrace.txt + coredump_backtrace="${coredump}-backtrace.txt" echoinfo "D:$systest:full backtrace from $coredump saved in $coredump_backtrace" "${top_builddir}/libtool" --mode=execute gdb \ -batch \