Merge pull request #60654 from ClickHouse/fuzzer-gdb

Try to run fuzzer under gdb
This commit is contained in:
Nikita Mikhaylov 2024-03-05 18:52:13 +01:00 committed by GitHub
commit 48bea29611
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -247,6 +247,12 @@ quit
fuzzer_pid=$! fuzzer_pid=$!
echo "Fuzzer pid is $fuzzer_pid" echo "Fuzzer pid is $fuzzer_pid"
# The fuzzer_pid belongs to the timeout process.
actual_fuzzer_pid=$(ps -o pid= --ppid "$fuzzer_pid")
echo "Attaching gdb to the fuzzer itself"
gdb -batch -command script.gdb -p $actual_fuzzer_pid &
# Wait for the fuzzer to complete. # Wait for the fuzzer to complete.
# Note that the 'wait || ...' thing is required so that the script doesn't # Note that the 'wait || ...' thing is required so that the script doesn't
# exit because of 'set -e' when 'wait' returns nonzero code. # exit because of 'set -e' when 'wait' returns nonzero code.