Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler-rt/lib/tsan/rtl/tsan_rtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ void FuncExit(ThreadState *thr) {
#if !SANITIZER_GO
DCHECK_LT(thr->shadow_stack_pos, thr->shadow_stack_end);
#endif
CHECK_GT(thr->shadow_stack_pos, thr->shadow_stack);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This place is to hot for CHECK, and we have DCHECK already

thr->shadow_stack_pos--;
}

Expand Down
6 changes: 6 additions & 0 deletions compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,16 @@ void FiberSwitchImpl(ThreadState *from, ThreadState *to) {

ThreadState *FiberCreate(ThreadState *thr, uptr pc, unsigned flags) {
void *mem = Alloc(sizeof(ThreadState));
if ((flags & FiberSwitchFlagNoSync))
thr->ignore_sync++;
ThreadState *fiber = static_cast<ThreadState *>(mem);
internal_memset(fiber, 0, sizeof(*fiber));
Tid tid = ThreadCreate(thr, pc, 0, true);
FiberSwitchImpl(thr, fiber);
ThreadStart(fiber, tid, 0, ThreadType::Fiber);
FiberSwitchImpl(fiber, thr);
if ((flags & FiberSwitchFlagNoSync))
thr->ignore_sync--;
return fiber;
}

Expand All @@ -357,6 +361,8 @@ void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) {

void FiberSwitch(ThreadState *thr, uptr pc,
ThreadState *fiber, unsigned flags) {
if (thr == fiber)
return;
if (!(flags & FiberSwitchFlagNoSync))
Release(thr, pc, (uptr)fiber);
FiberSwitchImpl(thr, fiber);
Expand Down
4 changes: 4 additions & 0 deletions openmp/runtime/src/ompt-specific.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,13 @@ int __ompt_get_task_memory_internal(void **addr, size_t *size, int blocknum) {
if (taskdata->td_flags.tasktype != TASK_EXPLICIT)
return 0; // support only explicit task

if (taskdata->td_size_alloc < 0)
return 0;

*addr = taskdata;
*size = taskdata->td_size_alloc;
return 0;

}

//----------------------------------------------------------
Expand Down
Loading