Bug 114478 - Add more type validation to debug builds
Summary: Add more type validation to debug builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on: 114512
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 16:29 PDT by Oliver Hunt
Modified: 2013-04-12 10:25 PDT (History)
16 users (show)

See Also:


Attachments
Patch (23.45 KB, patch)
2013-04-11 16:31 PDT, Oliver Hunt
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2013-04-11 16:29:53 PDT
Add more type validation to debug builds
Comment 1 Oliver Hunt 2013-04-11 16:31:59 PDT
Created attachment 197698 [details]
Patch
Comment 2 Mark Hahnenberg 2013-04-11 16:39:28 PDT
Comment on attachment 197698 [details]
Patch

r=me
Comment 3 Oliver Hunt 2013-04-11 18:41:54 PDT
Committed r148257: <http://trac.webkit.org/changeset/148257>
Comment 4 Ryosuke Niwa 2013-04-12 00:20:08 PDT
It appears that builds are still broken:

http://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/47424

6>C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\obj\WebCore\DerivedSources\JSBarInfo.cpp(152) : error C2440: 'reinterpret_cast' : cannot convert from 'void (__cdecl *const [])(void)' to 'void *'
6>        Conversion loses qualifiers
6>C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\obj\WebCore\DerivedSources\JSConsole.cpp(502) : error C2440: 'reinterpret_cast' : cannot convert from 'void (__cdecl *const [])(void)' to 'void *'
6>        Conversion loses qualifiers

...
Comment 5 Zan Dobersek 2013-04-12 01:58:33 PDT
I added the SkipVTableValidation attribute to the DOMSettableTokenList interface in r148269 to avoid crashes in the interace's toJS method. The crashes were occurring on the GTK and EFL builders when running the MicroData layout tests, the two ports being the only ones that enable the feature.

Please let me know if the fix is not appropriate and how to proceed in such case.

http://trac.webkit.org/changeset/148269

Crashes:
http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html
http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html
Comment 6 Andreas Kling 2013-04-12 06:22:02 PDT
Window release build is also borked after this:

12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore8LocationE
12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore15MediaControllerE
12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore11MessagePortE
12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore9NavigatorE
12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore13RadioNodeListE
12>WebCore.lib(DerivedSources.obj) : error LNK2001: unresolved external symbol __ZTVN7WebCore6ScreenE
...
Comment 7 Zoltan Arvai 2013-04-12 07:14:53 PDT
Qt Win build also broken, see bug 114512.
Comment 8 Oliver Hunt 2013-04-12 09:50:18 PDT
(In reply to comment #5)
> I added the SkipVTableValidation attribute to the DOMSettableTokenList interface in r148269 to avoid crashes in the interace's toJS method. The crashes were occurring on the GTK and EFL builders when running the MicroData layout tests, the two ports being the only ones that enable the feature.
> 
> Please let me know if the fix is not appropriate and how to proceed in such case.
> 
> http://trac.webkit.org/changeset/148269
> 
> Crashes:
> http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html
> http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html

I suspect so, but i'll look to verify -- i need to come up with a better way to manage these than what currently happens (the problems are basically no due to an inability to determine (in the toJS function) whether there are any subclasses, or at codegen time whether there's a vtable
Comment 9 Oliver Hunt 2013-04-12 10:25:10 PDT
(In reply to comment #8)
> (In reply to comment #5)
> > I added the SkipVTableValidation attribute to the DOMSettableTokenList interface in r148269 to avoid crashes in the interace's toJS method. The crashes were occurring on the GTK and EFL builders when running the MicroData layout tests, the two ports being the only ones that enable the feature.
> > 
> > Please let me know if the fix is not appropriate and how to proceed in such case.
> > 
> > http://trac.webkit.org/changeset/148269
> > 
> > Crashes:
> > http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html
> > http://build.webkit.org/results/GTK%20Linux%2064-bit%20Release/r148268%20(36738)/results.html
> 
> I suspect so, but i'll look to verify -- i need to come up with a better way to manage these than what currently happens (the problems are basically no due to an inability to determine (in the toJS function) whether there are any subclasses, or at codegen time whether there's a vtable

yup, thats the right fix -- i need to come up with a way to deal with types that have subclasses :-/