WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
182851
Fix bugs from
r228411
https://bugs.webkit.org/show_bug.cgi?id=182851
Summary
Fix bugs from r228411
Saam Barati
Reported
2018-02-15 16:37:39 PST
...
Attachments
patch
(17.10 KB, patch)
2018-02-15 17:30 PST
,
Saam Barati
jfbastien
: review+
Details
Formatted Diff
Diff
patch for landing
(16.77 KB, patch)
2018-02-15 18:39 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews206 for win-future
(11.47 MB, application/zip)
2018-02-15 20:29 PST
,
EWS Watchlist
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2018-02-15 17:04:09 PST
<
rdar://problem/37577732
>
Saam Barati
Comment 2
2018-02-15 17:30:55 PST
Created
attachment 333974
[details]
patch
EWS Watchlist
Comment 3
2018-02-15 17:33:53 PST
Attachment 333974
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ChangeLog:12: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: security bug [changelog/unwantedsecurityterms] [3] ERROR: Source/JavaScriptCore/dfg/DFGGraph.h:530: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 4
2018-02-15 17:35:54 PST
(In reply to Build Bot from
comment #3
)
>
Attachment 333974
[details]
did not pass style-queue: > > > ERROR: Source/JavaScriptCore/ChangeLog:12: Please consider whether the use > of security-sensitive phrasing could help someone exploit WebKit: security > bug [changelog/unwantedsecurityterms] [3]
This fixes bug from a patch that landed earlier this week. I'm going to keep the word "security" in the changelog since it's descriptive.
> ERROR: Source/JavaScriptCore/dfg/DFGGraph.h:530: This { should be at the > end of the previous line [whitespace/braces] [4] > Total errors found: 2 in 11 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style.
JF Bastien
Comment 5
2018-02-15 17:50:13 PST
Comment on
attachment 333974
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=333974&action=review
r=me
> JSTests/stress/constant-folding-phase-insert-check-handle-varargs.js:7 > + return properties[seed % properties.length];
I usually inline the object / properties because then the repro case isn't random anymore.
> Source/JavaScriptCore/dfg/DFGGraph.h:529 > + AdjacencyList copyVarargChildren(Node* node, WTF::Function<bool(Edge)> filter = [] (Edge) { return true; })
I think it's better to pass the function as a template param here, so you never have a WTF::Function ever.
> Source/JavaScriptCore/dfg/DFGPureValue.h:107 > + hash ^= m_graph->m_varArgChildren[m_children.firstChild() + i].sanitized().hash();
Sanitized hash is important here? Why?
Saam Barati
Comment 6
2018-02-15 18:18:44 PST
Comment on
attachment 333974
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=333974&action=review
>> JSTests/stress/constant-folding-phase-insert-check-handle-varargs.js:7 >> + return properties[seed % properties.length]; > > I usually inline the object / properties because then the repro case isn't random anymore.
The repro case here isn't random. It doesn't depend on the data. I believe it just depends on having the entire program tier up. It crashes 100% of the time with CJIT off.
>> Source/JavaScriptCore/dfg/DFGGraph.h:529 >> + AdjacencyList copyVarargChildren(Node* node, WTF::Function<bool(Edge)> filter = [] (Edge) { return true; }) > > I think it's better to pass the function as a template param here, so you never have a WTF::Function ever.
Sounds good.
>> Source/JavaScriptCore/dfg/DFGPureValue.h:107 >> + hash ^= m_graph->m_varArgChildren[m_children.firstChild() + i].sanitized().hash(); > > Sanitized hash is important here? Why?
Edge is basically a tuple of some metadata bits and Node*. But, we encode those bits in the upper bits of the Node* pointer. sanitized() just kills various, but not all, of those metadata bits. That makes sense for CSE, since for example, some edges may have different proof status bits. But that wouldn't imply that we couldn't CSE the owner of that edge together.
Saam Barati
Comment 7
2018-02-15 18:21:17 PST
Comment on
attachment 333974
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=333974&action=review
>>> Source/JavaScriptCore/dfg/DFGGraph.h:529 >>> + AdjacencyList copyVarargChildren(Node* node, WTF::Function<bool(Edge)> filter = [] (Edge) { return true; }) >> >> I think it's better to pass the function as a template param here, so you never have a WTF::Function ever. > > Sounds good.
I remember why I did this: the compiler can't infer the type of the template parameter when not called with a filter function. Not sure why? I guess I can specify a default type for the template parameter too, but I guess that leaves open the opportunity we actually end up with a WTF::Function
Saam Barati
Comment 8
2018-02-15 18:22:08 PST
Comment on
attachment 333974
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=333974&action=review
>>>> Source/JavaScriptCore/dfg/DFGGraph.h:529 >>>> + AdjacencyList copyVarargChildren(Node* node, WTF::Function<bool(Edge)> filter = [] (Edge) { return true; }) >>> >>> I think it's better to pass the function as a template param here, so you never have a WTF::Function ever. >> >> Sounds good. > > I remember why I did this: the compiler can't infer the type of the template parameter when not called with a filter function. Not sure why? I guess I can specify a default type for the template parameter too, but I guess that leaves open the opportunity we actually end up with a WTF::Function
actually, I can probably make the default type a C function pointer.
Saam Barati
Comment 9
2018-02-15 18:27:29 PST
Comment on
attachment 333974
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=333974&action=review
>>> Source/JavaScriptCore/dfg/DFGPureValue.h:107 >>> + hash ^= m_graph->m_varArgChildren[m_children.firstChild() + i].sanitized().hash(); >> >> Sanitized hash is important here? Why? > > Edge is basically a tuple of some metadata bits and Node*. But, we encode those bits in the upper bits of the Node* pointer. sanitized() just kills various, but not all, of those metadata bits. That makes sense for CSE, since for example, some edges may have different proof status bits. But that wouldn't imply that we couldn't CSE the owner of that edge together.
To clarify, when we're not in varargs mode, we sanitize m_children on construction of the PureValue. In this mode, we do it on demand, since there is no way to do it on construction without allocating extra memory.
Saam Barati
Comment 10
2018-02-15 18:39:49 PST
Created
attachment 333983
[details]
patch for landing
EWS Watchlist
Comment 11
2018-02-15 18:42:12 PST
Attachment 333983
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ChangeLog:12: Please consider whether the use of security-sensitive phrasing could help someone exploit WebKit: security bug [changelog/unwantedsecurityterms] [3] ERROR: Source/JavaScriptCore/dfg/DFGGraph.h:531: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 12
2018-02-15 20:29:35 PST
Comment on
attachment 333983
[details]
patch for landing
Attachment 333983
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/6528600
New failing tests: http/tests/preload/onerror_event.html
EWS Watchlist
Comment 13
2018-02-15 20:29:46 PST
Created
attachment 333994
[details]
Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Filip Pizlo
Comment 14
2018-02-15 21:46:12 PST
Looks like the failure probably has nothing to do with this patch.
Saam Barati
Comment 15
2018-02-16 10:44:02 PST
(In reply to Filip Pizlo from
comment #14
)
> Looks like the failure probably has nothing to do with this patch.
Agreed. Ima cq+
WebKit Commit Bot
Comment 16
2018-02-16 11:12:33 PST
Comment on
attachment 333983
[details]
patch for landing Clearing flags on attachment: 333983 Committed
r228565
: <
https://trac.webkit.org/changeset/228565
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug