RESOLVED FIXED 175358
JSTests/stress/v8-deltablue-strict.js fails with JSC_validateExceptionChecks=1
https://bugs.webkit.org/show_bug.cgi?id=175358
Summary JSTests/stress/v8-deltablue-strict.js fails with JSC_validateExceptionChecks=1
Robin Morisset
Reported 2017-08-08 16:49:02 PDT
Exactly what the summary says. It comes from getPropertySlot and virtualForWithFunction.
Attachments
Simple bookkeeping fix in two places (1.95 KB, patch)
2017-08-08 16:55 PDT, Robin Morisset
no flags
Cleaned up patch, also avoids unnecessary re-throws (3.37 KB, patch)
2017-08-08 19:13 PDT, Robin Morisset
no flags
Fixed patch, the problem came from a variable only used in an assert (3.61 KB, patch)
2017-08-09 10:27 PDT, Robin Morisset
no flags
Robin Morisset
Comment 1 2017-08-08 16:55:20 PDT
Created attachment 317650 [details] Simple bookkeeping fix in two places
Robin Morisset
Comment 2 2017-08-08 16:58:11 PDT
I was confused in my original comment (mixed it with another test case I was looking at). The problem came from putInlineForJSObject and virtualForWithFunction; not from getPropertySlot.
Saam Barati
Comment 3 2017-08-08 17:07:54 PDT
Comment on attachment 317650 [details] Simple bookkeeping fix in two places View in context: https://bugs.webkit.org/attachment.cgi?id=317650&action=review > Source/JavaScriptCore/jit/JITOperations.cpp:1064 > + ASSERT(throwScope.exception() || !error); Out of curiosity, why is the throwException below needed if we're just rethrowing the exception? Or is that not what's happening?
Robin Morisset
Comment 4 2017-08-08 17:15:34 PDT
I had not noticed that the exception being re thrown is the same that was already present. I will remove that re-throw as soon as I find a way to make the patch cleanly apply.
Mark Lam
Comment 5 2017-08-08 17:24:20 PDT
Comment on attachment 317650 [details] Simple bookkeeping fix in two places View in context: https://bugs.webkit.org/attachment.cgi?id=317650&action=review >> Source/JavaScriptCore/jit/JITOperations.cpp:1064 >> + ASSERT(throwScope.exception() || !error); > > Out of curiosity, why is the throwException below needed if we're just rethrowing the exception? Or is that not what's happening? There's a better way to express this assertion. See the other examples of calls to functionExecutable->prepareForExecution() in this file above.
Mark Lam
Comment 6 2017-08-08 17:27:51 PDT
Comment on attachment 317650 [details] Simple bookkeeping fix in two places View in context: https://bugs.webkit.org/attachment.cgi?id=317650&action=review >>> Source/JavaScriptCore/jit/JITOperations.cpp:1064 >>> + ASSERT(throwScope.exception() || !error); >> >> Out of curiosity, why is the throwException below needed if we're just rethrowing the exception? Or is that not what's happening? > > There's a better way to express this assertion. See the other examples of calls to functionExecutable->prepareForExecution() in this file above. And yes, it looks like the throwException below is actually not needed though it is harmless. You can remove it here (as well as at the other exception checks after calls to functionExecutable->prepareForExecution() above in this file. Thanks.
Robin Morisset
Comment 7 2017-08-08 19:13:43 PDT
Created attachment 317665 [details] Cleaned up patch, also avoids unnecessary re-throws
Saam Barati
Comment 8 2017-08-08 19:30:09 PDT
Comment on attachment 317665 [details] Cleaned up patch, also avoids unnecessary re-throws View in context: https://bugs.webkit.org/attachment.cgi?id=317665&action=review r=me > Source/JavaScriptCore/jit/JITOperations.cpp:1061 > + ASSERT(throwScope.exception() == reinterpret_cast<Exception*>(error)); Is this reinterpret_cast needed?
Robin Morisset
Comment 9 2017-08-09 09:56:42 PDT
I originally put this reinterpret cast to match the similar examples higher in the file. After looking at the C++ spec, I believe it is required: - Section 5.10 of the spec says that the operands of '==' have their type converted to their composite pointer type - I do not see anything in the notes at the start of Section 5 anything to define this composite pointer type for JSValue* and Exception*, and the note 13.9 of Section 5 says that "otherwise, a program that necessitates the determination of a composite pointer type is ill-formed." Does anyone know why this patch appeared to fail to compile in several of the queues (iOS, iOS-sim, jsc, Mac, Mac-wk2, Mac-32bit). I have retested-it on top of tree on my machine and it compiles with no issues.
Robin Morisset
Comment 10 2017-08-09 10:27:04 PDT
Created attachment 317719 [details] Fixed patch, the problem came from a variable only used in an assert
Mark Lam
Comment 11 2017-08-09 10:31:50 PDT
Comment on attachment 317719 [details] Fixed patch, the problem came from a variable only used in an assert r=me
WebKit Commit Bot
Comment 12 2017-08-09 11:31:28 PDT
Comment on attachment 317719 [details] Fixed patch, the problem came from a variable only used in an assert Clearing flags on attachment: 317719 Committed r220471: <http://trac.webkit.org/changeset/220471>
WebKit Commit Bot
Comment 13 2017-08-09 11:31:29 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.