Cannot build qt5-webkit with debug

Miroslav Lachman 000.fbsd at quip.cz
Wed Feb 26 11:35:32 UTC 2020


Michael Osipov wrote on 2020/02/25 11:16:
> Am 2020-02-24 um 22:52 schrieb Miroslav Lachman:

[...]

>> I tried it on the simplest web page without any fonts, css etc. but it
>> is still crashing. I removed the charset from the page so it is now not
>> using ICU.
>>
>> https://hastebin.com/iyonapasuz.bash
>>
>> Let me know if I can try anything else.
> 
> OK, it is getting closer.
> 
> The crash comes from this call:
> https://github.com/qtwebkit/qtwebkit/blob/qtwebkit-5.212.0-alpha3/Source/WebCore/css/CSSParser.cpp#L6907 
> 
> 
> Can you commet comment this line, recompile qtwebkit and see what happens?

I am sorry for my late reply.  Rebuilding of qt5-webkit is very strange. 
The build crashes with out of memory 3 times but finally I have 
qt5-webkit rebuilt with commented out line you suggested and it works now!

The example from my first attempt works:

(root at testjail) ~/# phantomjs /tmp/phantom.2.js
[blocked] The page at https://phantomjs.org/api/phantom/ was not allowed 
to run insecure content from 
http://fonts.googleapis.com/css?family=Droid+Sans:400,700.

https://phantomjs.org/api/phantom/
element is [object Object]
https://phantomjs.org/


I tried few more examples without crash so far.

This is the exact modification patch for qt5-webkit

# cat 
/vol0/poudriere/ports/headtest/www/qt5-webkit/files/patch-Source_WebCore_css_CSSParser.cpp
--- Source/WebCore/css/CSSParser.cpp.orig       2019-06-26 16:25:02 UTC
+++ Source/WebCore/css/CSSParser.cpp
@@ -6904,7 +6904,7 @@ void CSSParser::parseSystemFont(bool imp
      addProperty(CSSPropertyFontWeight, 
CSSValuePool::singleton().createValue(fontDescription.weight()), important);
      addProperty(CSSPropertyFontSize, 
CSSValuePool::singleton().createValue(fontDescription.specifiedSize(), 
CSSPrimitiveValue::CSS_PX), important);
      Ref<CSSValueList> fontFamilyList = 
CSSValueList::createCommaSeparated();
- 
fontFamilyList->append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), 
FromSystemFontID::Yes));
+ 
//fontFamilyList->append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), 
FromSystemFontID::Yes));
      addProperty(CSSPropertyFontFamily, WTFMove(fontFamilyList), 
important);
      addProperty(CSSPropertyFontVariantCaps, 
CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
      addProperty(CSSPropertyLineHeight, 
CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);



I am very curious what is wrong here? qt5-webkit is used by 60+ ports as 
a dependency so why only phantomjs crashes with it?

And what is not working now with the line fontFamilyList->append... 
removed()?

Should I report it upstream or is it FreeBSD specific problem?

Again, thank you so much for your help! Without it I will not be able to 
fix it.

Kind regards
Miroslav Lachman


More information about the freebsd-ports mailing list