[webkit-dev] Compilation issue with VS2015RC

Vienneau, Christopher cvienneau at ea.com
Tue Jul 14 17:20:24 PDT 2015


Using the changes in the patch you provided, I made progress but I have some observations to report:
I didn’t find the changes in ConsoleClient.cpp to be necessary, actually with my version of webkit they didn’t build as is, I removed them.  I think that the change to CSSPrimitiveValue.h is actually the part I was missing to fix the linking error.

When attempting to run with my test application I’m finding that most websites, facebook.com for example, are crashing in LowLevelInterpreterWin.asm code identified by LowLevelInterpreter.asm:476:
  _offlineasm_doCall__177_loadConstantOrVariable__done:
    cmp rbx, rcx                                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1798
    jne _offlineasm_doCall__opCallSlow
    movsxd rbx, dword ptr [32 + r8 + rsi * 8]                ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:114
   sal ebx, 3                                               ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1800
    neg rbx                                                  ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1801
    add rbx, rbp                                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1802
    mov qword ptr [24 + rbx], rcx                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1803
    movsxd rcx, dword ptr [24 + r8 + rsi * 8]                ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:114
    mov dword ptr [36 + rbp], esi                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1805
    mov dword ptr [32 + rbx], ecx                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1806
    add rbx, 16                                              ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:1807
    mov rsp, rbx                                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:472
    call qword ptr [32 + rdx]                                ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:476
    mov rcx, qword ptr [16 + rbp]                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:461
    mov edi, dword ptr [56 + rcx]                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:449
    sal rdi, 3                                               ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:450
    add rdi, 64                                              ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:451
    mov rsp, rbp                                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:456
    sub rsp, rdi
    mov esi, dword ptr [36 + rbp]                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:45
    mov r8, qword ptr [16 + rbp]                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:46
    mov r8, qword ptr [104 + r8]                             ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:47
    movsxd rdx, dword ptr [8 + r8 + rsi * 8]                 ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:114
    mov qword ptr [0 + rbp + rdx * 8], rax                   ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:49
    mov rcx, qword ptr [64 + r8 + rsi * 8]                   ; ..\..\JavaScriptCore\local\JavaScriptCore\llint\LowLevelInterpreter.asm:118
    mov qword ptr [16 + rcx], rax                            ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:491
    add rsi, 9                                               ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:31
    jmp qword ptr [0 + r8 + rsi * 8]                         ; ..\..\JavaScriptCore\local\JavaScriptCore\llint/LowLevelInterpreter64.asm:27

I tried regenerating the asm files but still have the issue.  I expect that some updates need to be done to the asm generator for vs2015.  Have you found this issue too?  Or have any suggestion on how to correct the crash?

Chris

From: Vienneau, Christopher
Sent: Friday, July 10, 2015 4:36 PM
To: 'Brent Fulgham'
Cc: Webkit Development List
Subject: RE: [webkit-dev] Compilation issue with VS2015RC

A brief look at your patch shows similar changes that I have done, I’ll investigate the additional changes which seem to relate to the linker error.  I’ll keep my eye on this bug now.

Many Thanks

From: Brent Fulgham [mailto:bfulgham at apple.com]
Sent: Friday, July 10, 2015 4:30 PM
To: Vienneau, Christopher
Cc: Webkit Development List
Subject: Re: [webkit-dev] Compilation issue with VS2015RC

Hi Chris,

We noticed the same thing. Please see <https://bugs.webkit.org/show_bug.cgi?id=146579>, where we are discussing how to move forward.

Thanks!

-Brent

On Jul 10, 2015, at 4:05 PM, Vienneau, Christopher <cvienneau at ea.com<mailto:cvienneau at ea.com>> wrote:

Hello,

Recently we’ve been attempting to move our code base to build with VS2015 RC since this provides us with some support that we’ll be needing in the future for our products.  The changes for compilation with the new compiler haven’t been too bad, and I have everything building with the exception of one line:

FILE: JSCSSValueCustom.cpp
Line95:
67           JSValue toJS(ExecState*, JSDOMGlobalObject* globalObject, CSSValue* value)
68           {
69               if (!value)
70                   return jsNull();
71
72               // Scripts should only ever see cloned CSSValues, never the internal ones.
73               ASSERT(value->isCSSOMSafe());
74
75               // If we're here under erroneous circumstances, prefer returning null over a potentially insecure value.
76               if (!value->isCSSOMSafe())
77                   return jsNull();
78
79               JSObject* wrapper = getCachedWrapper(globalObject->world(), value);
80
81               if (wrapper)
82                   return wrapper;
83
84               if (value->isWebKitCSSTransformValue())
85                   wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSTransformValue, value);
86               else if (value->isWebKitCSSFilterValue())
87                   wrapper = CREATE_DOM_WRAPPER(globalObject, WebKitCSSFilterValue, value);
88               else if (value->isValueList())
89                   wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValueList, value);
90               else if (value->isSVGPaint())
91                   wrapper = CREATE_DOM_WRAPPER(globalObject, SVGPaint, value);
92               else if (value->isSVGColor())
93                   wrapper = CREATE_DOM_WRAPPER(globalObject, SVGColor, value);
94               else if (value->isPrimitiveValue())
95                   wrapper = CREATE_DOM_WRAPPER(globalObject, CSSPrimitiveValue, value);
96               else
97                   wrapper = CREATE_DOM_WRAPPER(globalObject, CSSValue, value);
98
99               return wrapper;
100         }

It produces the linker error:
JSBindingsAllInOne.obj : error LNK2019: unresolved external symbol "public: __thiscall WebCore::CSSPrimitiveValue::operator<class WTF::Ref<class WebCore::CSSPrimitiveValue> > class WTF::Ref<class WebCore::CSSPrimitiveValue>(void)const " (??$?BV?$Ref at VCSSPrimitiveValue@WebCore@@@WTF@@@CSSPrimitiveValue at WebCore@@QBE?AV?$Ref at VCSSPrimitiveValue@WebCore@@@WTF@@XZ) referenced in function "class WebCore::JSDOMWrapper * __cdecl WebCore::createWrapper<class WebCore::JSCSSPrimitiveValue,class WebCore::CSSPrimitiveValue>(class WebCore::JSDOMGlobalObject *,class WebCore::CSSPrimitiveValue *)" (??$createWrapper at VJSCSSPrimitiveValue@WebCore@@VCSSPrimitiveValue at 2@@WebCore@@YAPAVJSDOMWrapper at 0@PAVJSDOMGlobalObject at 0@PAVCSSPrimitiveValue at 0@@Z)

As you can see there are many other similar code lines in the area, none of which cause a problem.  Despite my many attempts I can’t seem to satisfy the linker by providing it the definition it needs.
•         I’ve attempted manually adding the copy constructor definition (I believe that is what it is describing):
o   CSSPrimitiveValue::CSSPrimitiveValue(ClassType classType, const CSSPrimitiveValue& cloneFrom)
o   CSSPrimitiveValue::CSSPrimitiveValue(const CSSPrimitiveValue& cloneFrom)
•         I’ve tried removing the usage of the “AllInOne” file, thinking that it may be causing some issue.
•         I’ve attempted to debug the code when the offending line is commented out, hoping to see better how the other lines function.  Though I’m not sure what path would cause it to execute, I haven’t hit it in my limited testing.
•         One of my colleagues reached out the MS on the issue, but it behaves as expect on their end (small sample code does not find a bug in the compiler). https://social.msdn.microsoft.com/Forums/en-US/6b9787f3-62bd-473a-8aa1-5f6cd85ed87b/breaking-change-in-visual-studio-2015-rc?forum=vcgeneral


Any suggestions would be much appreciated

Thanks

Chris



_______________________________________________
webkit-dev mailing list
webkit-dev at lists.webkit.org<mailto:webkit-dev at lists.webkit.org>
https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20150715/a8e4e657/attachment.html>


More information about the webkit-dev mailing list