WebKit Bugzilla
Attachment 347489 Details for
Bug 188741
: [JSC] Suppress UBSan warnings for KeywordLookup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188741-20180820184714.patch (text/plain), 3.30 KB, created by
Yusuke Suzuki
on 2018-08-20 02:47:14 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-08-20 02:47:14 PDT
Size:
3.30 KB
patch
obsolete
>Subversion Revision: 235025 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 8f4f3380b9d68081f14b45a5cc53d3b70983ff91..a7299937d06af1e8692a2f776545a8ab91095bfb 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Suppress UBSan warnings for KeywordLookup >+ https://bugs.webkit.org/show_bug.cgi?id=188741 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Annotate KeywordLookup function with SUPPRESS_UBSAN since it utilizes unaligned >+ accesses heavily for some CPUs such as x86. >+ >+ * KeywordLookupGenerator.py: >+ (Trie.printAsC): >+ > 2018-08-19 Carlos Garcia Campos <cgarcia@igalia.com> > > [GLIB] Add API to throw exceptions using printf formatted strings >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index eac1685f75400fd21535b435f22da825030e45b8..85faeb3b41227bf2e2c17628512aba76a2360995 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,14 @@ >+2018-08-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Suppress UBSan warnings for KeywordLookup >+ https://bugs.webkit.org/show_bug.cgi?id=188741 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add SUPPRESS_UBSAN >+ >+ * wtf/Compiler.h: >+ > 2018-08-19 Yusuke Suzuki <yusukesuzuki@slowstart.org> > > [WTF] Add WTF::unalignedLoad and WTF::unalignedStore >diff --git a/Source/JavaScriptCore/KeywordLookupGenerator.py b/Source/JavaScriptCore/KeywordLookupGenerator.py >index d13daba61d24758b0a062a9695a1e1825094c46e..acc4a053ab02ea9ac8aa4eacb1527d748673a1b0 100644 >--- a/Source/JavaScriptCore/KeywordLookupGenerator.py >+++ b/Source/JavaScriptCore/KeywordLookupGenerator.py >@@ -190,7 +190,7 @@ def printAsC(self): > print("static const int maxTokenLength = %d;" % (self.maxLength() + 1)) > print("") > print("template <>") >- print("template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<UChar>::parseKeyword(JSTokenData* data)") >+ print("template <bool shouldCreateIdentifier> SUPPRESS_UBSAN ALWAYS_INLINE JSTokenType Lexer<UChar>::parseKeyword(JSTokenData* data)") > print("{") > print(" ASSERT(m_codeEnd - m_code >= maxTokenLength);") > print("") >@@ -200,7 +200,7 @@ def printAsC(self): > print("}") > print("") > print("template <>") >- print("template <bool shouldCreateIdentifier> ALWAYS_INLINE JSTokenType Lexer<LChar>::parseKeyword(JSTokenData* data)") >+ print("template <bool shouldCreateIdentifier> SUPPRESS_UBSAN ALWAYS_INLINE JSTokenType Lexer<LChar>::parseKeyword(JSTokenData* data)") > print("{") > print(" ASSERT(m_codeEnd - m_code >= maxTokenLength);") > print("") >diff --git a/Source/WTF/wtf/Compiler.h b/Source/WTF/wtf/Compiler.h >index 798c3090c9b1c18580a3a6be6fab65bdace6ffaa..edaebacdf9fdf873ff83a1139970df64b517edb7 100644 >--- a/Source/WTF/wtf/Compiler.h >+++ b/Source/WTF/wtf/Compiler.h >@@ -157,6 +157,14 @@ > #define SUPPRESS_ASAN > #endif > >+/* SUPPRESS_UBSAN */ >+ >+#if COMPILER(GCC_OR_CLANG) >+#define SUPPRESS_UBSAN __attribute__((no_sanitize("undefined"))) >+#else >+#define SUPPRESS_UBSAN >+#endif >+ > /* ==== Compiler-independent macros for various compiler features, in alphabetical order ==== */ > > /* ALWAYS_INLINE */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188741
: 347489