Qt WebKit on AIX -- need help/advice



  • I've been tasked with getting QT WebKit working on AIX, Solaris, and HPUX. With some work, I am currently able to compile and statically link QT WebKit 5.5.0 on AIX 6.1 using the IBM xlC 13.1.3 compiler. As I expected, I encounter issues at run-time, specifically in the JavaScriptCore module "low-level interpreter." Before I dive-in deep and debug, I'd like to see if by chance anyone:
    (1) has had success with Qt WebKit on AIX with JavaScriptCore.
    (2) has rough idea on how much effort it would be to get it working on these platforms, and what might be involved.

    I suspect that this is not working for anyone and will be non-trival, as indicated by the following from the QT Technical FAQ:

    I would like to know how I can build Qt on Solaris / HP-UX / AIX
    Note that Solaris 9 is currently not supported !
    See our Supported Platforms http://doc.qt.io/qt-5/supported-platforms.html
    You should be able to build Qt on those platforms if you disable WebKit and JavaScriptCore entirely. Those platforms are not supported and tested upstream, therefore Webkit is not supported on these.
    If you use the -no-script and -no-webkit configure flags, then things should be fine. The legacy Qt script implementation is now available as an add-on solution. See:
    http://blog.qt.io/2009/11/23/qtscript-in-46/

    In case this helps, my 32-bit application loads a simple html document with simple JavaScript via a string. When run on AIX 6.1, JavaScriptCore seg faults and core dumps when I call QWebFrame::setContent(const QByteArray&,const QString&,const QUrl&). This is working on Windows and Linux. Within QT WebKit, the failure occurs in: JSC::LLInt::CLoop::execute(JSC::ExecState*,JSC::OpcodeID,bool).

    There doesn't seem to be any issue with the first opcode encountered (from "LowLevelInterpreter.cpp"):
    356 opcode = LLInt::getOpcode(bootstrapOpcodeId);
    where bootstrapOpcodeId evaluates to: llint_program_prologue

    However, the next opcode is unknown (0x42ED62D0) and is causing an ASSERT and seg fault in my debug build:
    14 opcode = CAST<Opcode>(rPC.i8p);
    15 DISPATCH_OPCODE();
    //...
    404 switch (opcode)
    //...
    441 #if !ENABLE(COMPUTED_GOTO_OPCODES)
    442 default:
    443 ASSERT(false); // Aborted here...
    444 #endif
    445
    446 } // END bytecode handler cases.

    My html is quite simple as is the embedded javascript:
    <!DOCTYPE html>
    <html>
    <head>
    <title>HELLO, WORLD TEST</title>
    </head>
    <body>
    <div id="thediv">Hello, World!</div>
    <br/><br/><br/>
    <svg id="thesvg" height="200" width="200">
    <circle id="thecircle" cx="50" cy="50" r="100" stroke="black" stroke-width="3" fill="red"></circle>
    </svg>
    <script>
    thecircle.style.fill = 'green';
    thecircle.setAttribute('r', 300)
    </script>
    </body>
    </html>

    Here is the relevant call stack:
    WTFCrash(), line 345 in "Assertions.cpp"
    JSC::LLInt::CLoop::execute(JSC::ExecState*,JSC::OpcodeID,bool)(__classReturn = &(...), callFrame = 0xb003e058, bootstrapOpcodeId = llint_program_prologue, isInitializationPass = false), line 443 in "LowLevelInterpreter.cpp"
    unnamed block in Interpreter.JSC::Interpreter::execute(JSC::ProgramExecutable*,JSC::ExecState*,JSC::JSObject*)(this = 0x432201d8, __classReturn = &(...), program = 0xb05cffa8, callFrame = 0xb04cfc88, thisObj = 0xb048ffd8), line 949 in "Interpreter.cpp"
    Interpreter.JSC::Interpreter::execute(JSC::ProgramExecutable*,JSC::ExecState*,JSC::JSObject*)(this = 0x432201d8, __classReturn = &(...), program = 0xb05cffa8, callFrame = 0xb04cfc88, thisObj = 0xb048ffd8), line 949 in "Interpreter.cpp"
    JSC::evaluate(JSC::ExecState*,const JSC::SourceCode&,JSC::JSValue,JSC::JSValue*)(__classReturn = &(...), exec = 0xb04cfc88, source = &(...), thisValue = (...), returnedException = 0x2ff1eff8), line 83 in "Completion.cpp"
    ScriptController.WebCore::JSMainThreadExecState::evaluate(JSC::ExecState*,const JSC::SourceCode&,JSC::JSValue,JSC::JSValue*)(0x2ff1f000, 0xb04cfc88, 0x2ff1f1ec, 0xfffffffb, 0xb048ffd8, 0x2ff1eff8), line 77 in "JSMainThreadExecState.h"
    WebCore::ScriptController::evaluateInWorld(const WebCore::ScriptSourceCode&,WebCore::DOMWrapperWorld*)(this = 0x43206d90, __classReturn = &(...), sourceCode = &(...), world = 0x43224628), line 142 in "ScriptController.cpp"
    WebCore::ScriptController::evaluate(const WebCore::ScriptSourceCode&)(this = 0x43206d90, __classReturn = &(...), sourceCode = &(...)), line 158 in "ScriptController.cpp"
    unnamed block in WebCore::ScriptElement::executeScript(const WebCore::ScriptSourceCode&)(this = 0x4326e204, sourceCode = &(...)), line 316 in "ScriptElement.cpp"
    unnamed block in WebCore::ScriptElement::executeScript(const WebCore::ScriptSourceCode&)(this = 0x4326e204, sourceCode = &(...)), line 316 in "ScriptElement.cpp"
    WebCore::ScriptElement::executeScript(const WebCore::ScriptSourceCode&)(this = 0x4326e204, sourceCode = &(...)), line 316 in "ScriptElement.cpp"
    unnamed block in WebCore::ScriptElement::prepareScript(const WTF::TextPosition&,WebCore::ScriptElement::LegacyTypeSupport)(this = 0x4326e204, scriptStartPosition = &(...), supportLegacyTypes = ScriptElement::DisallowLegacyTypeInTypeAttribute), line 245 in "ScriptElement.cpp"
    WebCore::ScriptElement::prepareScript(const WTF::TextPosition&,WebCore::ScriptElement::LegacyTypeSupport)(this = 0x4326e204, scriptStartPosition = &(...), supportLegacyTypes = ScriptElement::DisallowLegacyTypeInTypeAttribute), line 245 in "ScriptElement.cpp"
    unnamed block in WebCore::HTMLScriptRunner::runScript(WebCore::Element*,const WTF::TextPosition&)(this = 0x43225d38, script = 0x4326e1c8, scriptStartPosition = &(...)), line 312 in "HTMLScriptRunner.cpp"
    WebCore::HTMLScriptRunner::runScript(WebCore::Element*,const WTF::TextPosition&)(this = 0x43225d38, script = 0x4326e1c8, scriptStartPosition = &(...)), line 312 in "HTMLScriptRunner.cpp"
    WebCore::HTMLScriptRunner::execute(WTF::PassRefPtrWebCore::Element,const WTF::TextPosition&)(this = 0x43225d38, scriptElement = &(...), scriptStartPosition = &(...)), line 181 in "HTMLScriptRunner.cpp"
    WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder()(this = 0x4324e068), line 271 in "HTMLDocumentParser.cpp"
    WebCore::HTMLDocumentParser::canTakeNextToken(WebCore::HTMLDocumentParser::SynchronousMode,WebCore::PumpSession&)(this = 0x4324e068, mode = AllowYield, session = &(...)), line 290 in "HTMLDocumentParser.cpp"
    WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)(this = 0x4324e068, mode = AllowYield), line 535 in "HTMLDocumentParser.cpp"
    WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode)(this = 0x4324e068, mode = AllowYield), line 235 in "HTMLDocumentParser.cpp"
    WebCore::HTMLDocumentParser::append(WTF::PassRefPtrWTF::StringImpl)(this = 0x4324e068, inputSource = &(...)), line 740 in "HTMLDocumentParser.cpp"
    WebCore::DecodedDataDocumentParser::appendBytes(WebCore::DocumentWriter*,const char*,unsigned long)(this = 0x4324e068, writer = 0x4321de08, data = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 50 in "DecodedDataDocumentParser.cpp"
    WebCore::DocumentWriter::addData(const char*,unsigned long)(this = 0x4321de08, bytes = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 225 in "DocumentWriter.cpp"
    WebCore::DocumentLoader::commitData(const char*,unsigned long)(this = 0x4321dd98, bytes = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 803 in "DocumentLoader.cpp"
    WebCore::FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader*,const char*,int)(this = 0x432066a0, loader = 0x4321dd98, data = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 879 in "FrameLoaderClientQt.cpp"
    WebCore::DocumentLoader::commitLoad(const char*,int)(this = 0x4321dd98, data = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 745 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::dataReceived(WebCore::CachedResource*,const char*,int)(this = 0x4321dd98, resource = (nil), data = "<!DOCTYPE html><HTML><HEAD><TITLE>HELLO, WORLD TEST</TITLE></HEAD><BODY><DIV id='thediv'>Hello, World!</DIV><BR/><BR/><BR/><svg height='200' width='200'><circle id='thecircle' cx='50' cy='50' r='100' stroke='black' stroke-width='3' fill='red' /></svg><script>thecircle.style.fill='green';thecircle.setAttribute('r',300);</script></BODY></HTML>f[[", length = 343), line 850 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)(this = 0x4321dd98, policy = PolicyUse), line 724 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*,const WebCore::ResourceResponse&)(this = 0x4321dd98, resource = (nil), response = &(...)), line 623 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::handleSubstituteDataLoadNow(WebCore::TimerWebCore::DocumentLoader)(this = 0x4321dd98, = (nil)), line 442 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::handleSubstituteDataLoadSoon()(this = 0x4321dd98), line 460 in "DocumentLoader.cpp"
    WebCore::DocumentLoader::startLoadingMainResource()(this = 0x4321dd98), line 1374 in "DocumentLoader.cpp"
    WebCore::FrameLoader::continueLoadAfterWillSubmitForm()(this = 0x43206878), line 2239 in "FrameLoader.cpp"
    WebCore::FrameLoader::continueLoadAfterNavigationPolicy(const WebCore::ResourceRequest&,WTF::PassRefPtrWebCore::FormState,bool)(this = 0x43206878, = &(...), formState = &(...), shouldContinue = true), line 2890 in "FrameLoader.cpp"
    WebCore::FrameLoader::callContinueLoadAfterNavigationPolicy(void
    ,const WebCore::ResourceRequest&,WTF::PassRefPtrWebCore::FormState,bool)(argument = 0x43206878, request = &(...), formState = &(...), shouldContinue = true), line 2719 in "FrameLoader.cpp"
    PolicyChecker.WebCore::PolicyChecker::checkNavigationPolicy(const WebCore::ResourceRequest&,WebCore::DocumentLoader*,WTF::PassRefPtrWebCore::FormState,void()(void,const WebCore::ResourceRequest&,WTF::PassRefPtrWebCore::FormState,bool),void*)(this = 0x43206a90, request = &(...), loader = 0x4321dd98, formState = &(...), function = 0x431ba0d4, argument = 0x43206878), line 72 in "PolicyChecker.cpp"
    WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*,WebCore::FrameLoadType,WTF::PassRefPtrWebCore::FormState)(this = 0x43206878, loader = 0x4321dd98, type = FrameLoadTypeStandard, prpFormState = &(...)), line 1415 in "FrameLoader.cpp"
    FrameLoader.WebCore::FrameLoader::load(WebCore::DocumentLoader*)(this = 0x43206878, newDocumentLoader = 0x4321dd98), line 1357 in "FrameLoader.cpp"
    FrameLoader.WebCore::FrameLoader::load(const WebCore::FrameLoadRequest&)(this = 0x43206878, passedRequest = &(...)), line 1307 in "FrameLoader.cpp"
    QWebFrameAdapter::setContent(const QByteArray&,const QString&,const QUrl&)(this = 0x432064c0, data = &(...), mimeType = &(...), baseUrl = &(...)), line 277 in "QWebFrameAdapter.cpp"
    QWebFrame::setContent(const QByteArray&,const QString&,const QUrl&)(this = 0x432060a8, data = &(...), mimeType = &(...), baseUrl = &(...)), line 481 in "qwebframe.cpp"
    EmbedWebPage::loadDoc(const QByteArray&,QString)(this = 0x30996ec0, html = &(...), mimeType = &(...)), line 26 in "EmbedWebPage.cpp"


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.