]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Write traceback file to the same directory as core file
authorMichal Nowak <mnowak@isc.org>
Tue, 24 Nov 2020 16:39:23 +0000 (17:39 +0100)
committerMichal Nowak <mnowak@isc.org>
Thu, 26 Nov 2020 17:29:41 +0000 (18:29 +0100)
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.

(cherry picked from commit 6428fc26af232e0954b65347c1a232e203377321)

bin/tests/system/run.sh

index 5101e7f091e0c5b9c1a23436b705f34ee5e1be8e..2168b9db4d16120e4a98b5523945d755e633195d 100644 (file)
@@ -283,7 +283,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}/libtool" --mode=execute gdb \
                       -batch \