Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
72cddf33
Commit
72cddf33
authored
12 years ago
by
Dmitry Vyukov
Browse files
Options
Downloads
Patches
Plain Diff
tsan: more robust current thread stack restoration
llvm-svn: 163089
parent
c6fd8209
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
+5
-3
5 additions, 3 deletions
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
with
5 additions
and
3 deletions
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
+
5
−
3
View file @
72cddf33
...
@@ -399,6 +399,11 @@ void ReportRace(ThreadState *thr) {
...
@@ -399,6 +399,11 @@ void ReportRace(ThreadState *thr) {
Shadow
s
(
thr
->
racy_state
[
i
]);
Shadow
s
(
thr
->
racy_state
[
i
]);
RestoreStack
(
s
.
tid
(),
s
.
epoch
(),
&
traces
[
i
]);
RestoreStack
(
s
.
tid
(),
s
.
epoch
(),
&
traces
[
i
]);
}
}
// Failure to restore stack of the current thread
// was observed on free() interceptor called from pthread.
// Just get the current shadow stack instead.
if
(
traces
[
0
].
IsEmpty
())
traces
[
0
].
ObtainCurrent
(
thr
,
0
);
if
(
HandleRacyStacks
(
thr
,
traces
,
addr_min
,
addr_max
))
if
(
HandleRacyStacks
(
thr
,
traces
,
addr_min
,
addr_max
))
return
;
return
;
...
@@ -408,9 +413,6 @@ void ReportRace(ThreadState *thr) {
...
@@ -408,9 +413,6 @@ void ReportRace(ThreadState *thr) {
rep
.
AddMemoryAccess
(
addr
,
s
,
&
traces
[
i
]);
rep
.
AddMemoryAccess
(
addr
,
s
,
&
traces
[
i
]);
}
}
// Ensure that we have at least something for the current thread.
DCHECK_EQ
(
traces
[
0
].
IsEmpty
(),
false
);
for
(
uptr
i
=
0
;
i
<
kMop
;
i
++
)
{
for
(
uptr
i
=
0
;
i
<
kMop
;
i
++
)
{
FastState
s
(
thr
->
racy_state
[
i
]);
FastState
s
(
thr
->
racy_state
[
i
]);
ThreadContext
*
tctx
=
ctx
->
threads
[
s
.
tid
()];
ThreadContext
*
tctx
=
ctx
->
threads
[
s
.
tid
()];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment