* [PATCH, TSAN] Fix a crash in ScopedReport::AddThread
@ 2015-03-11 14:41 Bernd Edlinger
2015-03-11 14:43 ` Jakub Jelinek
2015-03-11 15:10 ` Dmitry Vyukov
0 siblings, 2 replies; 3+ messages in thread
From: Bernd Edlinger @ 2015-03-11 14:41 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Dmitry Vyukov, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
Hi Jakub,
with my OPC UA Server, I observe a reproducible crash in
ScopedReport::AddThread: tctx==NULL
in "if ((u32)rep_->threads[i]->id == tctx->tid)".
Apparently, Dmitry has already fixed that in the obvious way.
So we should cherry pick these two changes from LLVM: 224508 and 224755
See attachment.
Builds cleanly and fixes the problem for me.
OK for trunk?
Thanks
Bernd.
[-- Attachment #2: patch-tsan-crash.diff --]
[-- Type: application/octet-stream, Size: 639 bytes --]
2015-03-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tsan/tsan_rtl_report.cc (ScopedReport::AddThread): Cherry pick
upstream 224508 and 224755.
--- libsanitizer/tsan/tsan_rtl_report.cc.jj 2014-11-13 21:41:38.000000000 +0100
+++ libsanitizer/tsan/tsan_rtl_report.cc 2015-03-11 14:29:07.555918850 +0100
@@ -242,7 +242,8 @@ ThreadContext *IsThreadStackOrTls(uptr a
void ScopedReport::AddThread(int unique_tid, bool suppressable) {
#ifndef TSAN_GO
- AddThread(FindThreadByUidLocked(unique_tid), suppressable);
+ if (const ThreadContext *tctx = FindThreadByUidLocked(unique_tid))
+ AddThread(tctx, suppressable);
#endif
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, TSAN] Fix a crash in ScopedReport::AddThread
2015-03-11 14:41 [PATCH, TSAN] Fix a crash in ScopedReport::AddThread Bernd Edlinger
@ 2015-03-11 14:43 ` Jakub Jelinek
2015-03-11 15:10 ` Dmitry Vyukov
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Jelinek @ 2015-03-11 14:43 UTC (permalink / raw)
To: Bernd Edlinger; +Cc: Dmitry Vyukov, gcc-patches
On Wed, Mar 11, 2015 at 03:41:27PM +0100, Bernd Edlinger wrote:
> Hi Jakub,
>
>
> with my OPC UA Server, I observe a reproducible crash in
> ScopedReport::AddThread: tctx==NULL
> in "if ((u32)rep_->threads[i]->id == tctx->tid)".
>
> Apparently, Dmitry has already fixed that in the obvious way.
>
> So we should cherry pick these two changes from LLVM: 224508 and 224755
> See attachment.
>
>
> Builds cleanly and fixes the problem for me.
>
> OK for trunk?
Ok.
Jakub
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, TSAN] Fix a crash in ScopedReport::AddThread
2015-03-11 14:41 [PATCH, TSAN] Fix a crash in ScopedReport::AddThread Bernd Edlinger
2015-03-11 14:43 ` Jakub Jelinek
@ 2015-03-11 15:10 ` Dmitry Vyukov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Vyukov @ 2015-03-11 15:10 UTC (permalink / raw)
To: Bernd Edlinger; +Cc: Jakub Jelinek, gcc-patches
OK
On Wed, Mar 11, 2015 at 5:41 PM, Bernd Edlinger
<bernd.edlinger@hotmail.de> wrote:
> Hi Jakub,
>
>
> with my OPC UA Server, I observe a reproducible crash in
> ScopedReport::AddThread: tctx==NULL
> in "if ((u32)rep_->threads[i]->id == tctx->tid)".
>
> Apparently, Dmitry has already fixed that in the obvious way.
>
> So we should cherry pick these two changes from LLVM: 224508 and 224755
> See attachment.
>
>
> Builds cleanly and fixes the problem for me.
>
> OK for trunk?
>
>
> Thanks
> Bernd.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-11 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 14:41 [PATCH, TSAN] Fix a crash in ScopedReport::AddThread Bernd Edlinger
2015-03-11 14:43 ` Jakub Jelinek
2015-03-11 15:10 ` Dmitry Vyukov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).