Add build.sh flag support for build errsim_sanity and fix bug of compile errsim_asan
This commit is contained in:
parent
4f162cdcc5
commit
1b72a5a0e4
3
build.sh
3
build.sh
@ -215,6 +215,9 @@ function build
|
||||
xsanity)
|
||||
do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_USE_LLD=$LLD_OPTION -DENABLE_SANITY=ON
|
||||
;;
|
||||
xerrsim_sanity)
|
||||
do_build "$@" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOB_ERRSIM=ON -DOB_USE_LLD=$LLD_OPTION -DENABLE_SANITY=ON
|
||||
;;
|
||||
*)
|
||||
BUILD_ARGS=(debug "${BUILD_ARGS[@]}")
|
||||
build
|
||||
|
6
deps/oblib/src/lib/thread/thread.cpp
vendored
6
deps/oblib/src/lib/thread/thread.cpp
vendored
@ -120,9 +120,13 @@ int Thread::start()
|
||||
|
||||
void Thread::stop()
|
||||
{
|
||||
bool stack_addr_flag = true;
|
||||
#ifndef OB_USE_ASAN
|
||||
stack_addr_flag = (stack_addr_ != NULL);
|
||||
#endif
|
||||
#ifdef ERRSIM
|
||||
if (!stop_
|
||||
&& stack_addr_ != NULL
|
||||
&& stack_addr_flag
|
||||
&& 0 != (OB_E(EventTable::EN_THREAD_HANG) 0)) {
|
||||
int tid_offset = 720;
|
||||
int tid = *(pid_t*)((char*)pth_ + tid_offset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user