Enabled core dump on Linux, and print stack trace on failure.

This commit is contained in:
kennytm 2018-07-13 01:56:17 +08:00
parent 7db82ccd76
commit 1e1b800c2e
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
3 changed files with 31 additions and 1 deletions

View file

@ -99,6 +99,7 @@ objdir=$root_dir/obj
mkdir -p $HOME/.cargo
mkdir -p $objdir/tmp
mkdir $objdir/cores
args=
if [ "$SCCACHE_BUCKET" != "" ]; then

View file

@ -24,6 +24,11 @@ if [ "$NO_CHANGE_USER" = "" ]; then
fi
fi
# only enable core dump on Linux
if [ -f /proc/sys/kernel/core_pattern ]; then
ulimit -c unlimited
fi
ci_dir=`cd $(dirname $0) && pwd`
source "$ci_dir/shared.sh"