WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 198876
198313
[WHLSL] The checker should not have pointers/references into its maps
https://bugs.webkit.org/show_bug.cgi?id=198313
Summary
[WHLSL] The checker should not have pointers/references into its maps
Robin Morisset
Reported
2019-05-28 17:12:04 PDT
m_typeMap is currently HashMap<AST::Expression*, ResolvingType> m_typeMap; This is buggy, because some code in the checker has references into it, and they get invalidated whenever the typeMap is resized. Instead the Map should contain UniqueRef<ResolvingType>, and then we should only have references to the ResolvingType itself. This bugs currently prevents checking the full standard library.
Attachments
WIP
(4.47 KB, patch)
2019-05-28 17:27 PDT
,
Robin Morisset
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Robin Morisset
Comment 1
2019-05-28 17:27:44 PDT
Created
attachment 370812
[details]
WIP
Myles C. Maxfield
Comment 2
2019-05-29 13:30:27 PDT
Comment on
attachment 370812
[details]
WIP View in context:
https://bugs.webkit.org/attachment.cgi?id=370812&action=review
> Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:494 > + HashMap<AST::Expression*, std::unique_ptr<ResolvingType>> m_typeMap;
UniqueRef didn't work?
Robin Morisset
Comment 3
2019-05-29 14:57:15 PDT
No, because it does not offer the right methods to be in a HashMap (I think it is missing a copy operator or something. I could have looked in detail, and tried to improve either HashMap or UniqueRef to work together, but using std::unique_ptr seemed way easier and good enough for this purpose. (In reply to Myles C. Maxfield from
comment #2
)
> Comment on
attachment 370812
[details]
> WIP > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=370812&action=review
> > > Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp:494 > > + HashMap<AST::Expression*, std::unique_ptr<ResolvingType>> m_typeMap; > > UniqueRef didn't work?
Radar WebKit Bug Importer
Comment 4
2019-05-30 20:26:36 PDT
<
rdar://problem/51288768
>
Saam Barati
Comment 5
2019-06-18 16:37:55 PDT
patch forthcoming with tests.
Saam Barati
Comment 6
2019-06-18 16:40:56 PDT
actually, just gonna do this as part of the matrix patch. it's too difficult to split up as we'll end up with checker errors.
Saam Barati
Comment 7
2019-06-18 16:41:06 PDT
*** This bug has been marked as a duplicate of
bug 198876
***
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