Title: [236909] trunk/Source/WTF
- Revision
- 236909
- Author
- mark....@apple.com
- Date
- 2018-10-07 13:09:45 -0700 (Sun, 07 Oct 2018)
Log Message
Adding some temporary asserts with data logging to debug a mysterious ASAN bot crash.
https://bugs.webkit.org/show_bug.cgi?id=190334
<rdar://problem/45071303>
Reviewed by Yusuke Suzuki.
These assertions are needed because we can't reproduce the issue locally.
We'll remove these asserts after the needed data has been collected from the bot.
* wtf/StackBounds.cpp:
(WTF::StackBounds::newThreadStackBounds):
* wtf/StackBounds.h:
(WTF::StackBounds::checkConsistency const):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (236908 => 236909)
--- trunk/Source/WTF/ChangeLog 2018-10-07 16:51:42 UTC (rev 236908)
+++ trunk/Source/WTF/ChangeLog 2018-10-07 20:09:45 UTC (rev 236909)
@@ -1,3 +1,19 @@
+2018-10-06 Mark Lam <mark....@apple.com>
+
+ Adding some temporary asserts with data logging to debug a mysterious ASAN bot crash.
+ https://bugs.webkit.org/show_bug.cgi?id=190334
+ <rdar://problem/45071303>
+
+ Reviewed by Yusuke Suzuki.
+
+ These assertions are needed because we can't reproduce the issue locally.
+ We'll remove these asserts after the needed data has been collected from the bot.
+
+ * wtf/StackBounds.cpp:
+ (WTF::StackBounds::newThreadStackBounds):
+ * wtf/StackBounds.h:
+ (WTF::StackBounds::checkConsistency const):
+
2018-10-07 Yusuke Suzuki <yusukesuz...@slowstart.org>
Name Heap threads
Modified: trunk/Source/WTF/wtf/StackBounds.cpp (236908 => 236909)
--- trunk/Source/WTF/wtf/StackBounds.cpp 2018-10-07 16:51:42 UTC (rev 236908)
+++ trunk/Source/WTF/wtf/StackBounds.cpp 2018-10-07 20:09:45 UTC (rev 236909)
@@ -144,6 +144,19 @@
// If stack grows up, origin and bound in this code should be swapped.
if (stackDirection() == StackDirection::Upward)
std::swap(origin, bound);
+
+ // The following set of assertions are only needed for debugging a
+ // mysterious crash on an ASAN bot that is not reproducible otherwise.
+ // Will remove after the needed data has been collected.
+#if OS(LINUX)
+ else {
+ ASSERT(stackDirection() == StackDirection::Downward);
+ void* currentPosition = ¤tPosition;
+ ASSERT_WITH_MESSAGE_UNUSED(currentPosition, (currentPosition < origin && currentPosition > bound), "newThreadStackBounds: currentPosition %p origin %p bound %p stackSize %zu", currentPosition, origin, bound, stackSize);
+ }
+#endif
+ // End of ASAN bot debugging assertions.
+
return StackBounds { origin, bound };
}
Modified: trunk/Source/WTF/wtf/StackBounds.h (236908 => 236909)
--- trunk/Source/WTF/wtf/StackBounds.h 2018-10-07 16:51:42 UTC (rev 236908)
+++ trunk/Source/WTF/wtf/StackBounds.h 2018-10-07 20:09:45 UTC (rev 236909)
@@ -152,18 +152,10 @@
// mysterious crash on an ASAN bot that is not reproducible otherwise.
// Will remove after the needed data has been collected.
#if OS(LINUX)
- ASSERT(currentPosition);
- ASSERT(m_origin);
- ASSERT(m_bound);
- ASSERT(currentPosition != m_origin);
- ASSERT(currentPosition != m_bound);
- if (isGrowingDownward()) {
- ASSERT(currentPosition < m_origin);
- ASSERT(currentPosition > m_bound);
- } else {
- ASSERT(currentPosition > m_origin);
- ASSERT(currentPosition < m_bound);
- }
+ if (isGrowingDownward())
+ ASSERT_WITH_MESSAGE((currentPosition < m_origin && currentPosition > m_bound), "checkConsistency: currentPosition %p m_origin %p m_bound %p stackSize %zu", currentPosition, m_origin, m_bound, (reinterpret_cast<uint8_t*>(m_origin) - reinterpret_cast<uint8_t*>(m_bound)));
+ else
+ ASSERT_WITH_MESSAGE((currentPosition > m_origin && currentPosition < m_bound), "checkConsistency: currentPosition %p m_origin %p m_bound %p stackSize %zu", currentPosition, m_origin, m_bound, (reinterpret_cast<uint8_t*>(m_bound) - reinterpret_cast<uint8_t*>(m_origin)));
#endif // OS(LINUX)
// End of ASAN bot debugging assertions.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes