Summary: | ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryan Haddad <ryanhaddad> | ||||||||
Component: | New Bugs | Assignee: | Jiewen Tan <jiewen_tan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | aestes, bfulgham, commit-queue, darin, dbates, jiewen_tan, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | Other | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 160880 | ||||||||||
Attachments: |
|
Description
Ryan Haddad
2016-11-28 16:50:20 PST
Test was added with http://trac.webkit.org/changeset/208918 Also seen with crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html: https://build.webkit.org/results/Apple%20Yosemite%20Debug%20WK2%20(Tests)/r209023%20(16398)/results.html Created attachment 295552 [details]
Crash log
Can't reproduce on my local machine. The stack trace seems wired as everything after frame 15 seems unreasonable. (In reply to comment #4) > Can't reproduce on my local machine. The stack trace seems wired as > everything after frame 15 seems unreasonable. Wait. Reproduced with --fully-parallel flag. I probably figured out the issue. Created attachment 295568 [details]
Patch
Comment on attachment 295568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295568&action=review r=me > Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:85 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { You may want to consider adding a comment above this line that explains that we capture callback even though the lambda does not explicitly call it because callback must be destroyed on the main thread. > Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:91 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { You may want to add a similar comment above this line or add one such comment above the first postTask() call. > Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:107 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:113 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:70 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:76 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:90 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:96 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:81 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:87 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:102 > + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { Ditto. > Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:108 > + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { Ditto. Comment on attachment 295568 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=295568&action=review Thanks Dan for r+ my patch. >> Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:85 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > You may want to consider adding a comment above this line that explains that we capture callback even though the lambda does not explicitly call it because callback must be destroyed on the main thread. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:91 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > You may want to add a similar comment above this line or add one such comment above the first postTask() call. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:107 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:113 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:70 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:76 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:90 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:96 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:81 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:87 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:102 >> + context.postTask([exceptionCallback = WTFMove(exceptionCallback), ec = result.releaseException().code(), callback = WTFMove(callback)](ScriptExecutionContext& context) { > > Ditto. Fixed. >> Source/WebCore/crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:108 >> + context.postTask([callback = WTFMove(callback), result = result.releaseReturnValue(), exceptionCallback = WTFMove(exceptionCallback)](ScriptExecutionContext& context) { > > Ditto. Fixed. Created attachment 295576 [details]
Patch for landing
Comment on attachment 295576 [details] Patch for landing Clearing flags on attachment: 295576 Committed r209059: <http://trac.webkit.org/changeset/209059> Patch landed with lots of the typo "derenference" instead of "dereference". (In reply to comment #13) > Patch landed with lots of the typo "derenference" instead of "dereference". Thanks for pointing out. A followup patch is landed. Committed r209061: <http://trac.webkit.org/changeset/209061> |