Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Fixes for ppc64le #40

Merged
merged 2 commits into from
Jul 3, 2018
Merged

Fixes for ppc64le #40

merged 2 commits into from
Jul 3, 2018

Conversation

notorca
Copy link
Contributor

@notorca notorca commented Jun 21, 2018

I'm not sure if anyone is interested it this. Looks like changing block size is not so bad on all platforms https://bugs.webkit.org/show_bug.cgi?id=65768. Endianness detection fix also pretty safe.

@@ -77,7 +77,7 @@ namespace JSC {
template <typename Functor> void forEach(Functor&);

private:
static const size_t blockSize = 16 * KB;
static const size_t blockSize = 64 * KB;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the commit in WebKit, it was part of a larger change which implemented a new allocator. I'm not sure whether it would be cause some other regression, so please re-work this by fixing PageAllocationAligned.cpp -- I believe the link referenced here can be the start of a better solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly adding
if (alignment > pagesize)
alignmentDelta = alignment - pagesize; https://github.com/wkhtmltopdf/qt/blob/wk_4.8.7/src/3rdparty/webkit/Source/JavaScriptCore/wtf/PageAllocationAligned.cpp#L53 is better

@ashkulz
Copy link
Member

ashkulz commented Jun 21, 2018

BTW, did you build and test it? Which distro do you normally use?

@notorca
Copy link
Contributor Author

notorca commented Jun 21, 2018

@ashkulz Builded and tested on RHEL 7.5. With this fixes I'm able to convert all my pages to pdf. Without page size fix it just crashes, and without endianness fix it hangs in infinity loop in BigInteger multiplication.

Copy link
Member

@ashkulz ashkulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make that change, test it and re-submit it again?

@notorca
Copy link
Contributor Author

notorca commented Jun 22, 2018

@ashkulz Fixed

@ashkulz
Copy link
Member

ashkulz commented Jun 22, 2018

Fix looks good to me, other than a spelling mistake (owerflow -> overflow). Can you upload the build over here so that @eugenepptech or @sarahkemp can confirm that the fix works? As I can't really verify the fix, I'd like one other confirmation before merging it.

@ashkulz
Copy link
Member

ashkulz commented Jun 28, 2018

Can you check if the rpm built with your changes works? Would also appreciate confirmation from @eugenepptech

@notorca
Copy link
Contributor Author

notorca commented Jul 3, 2018

I've checked it, works fine.

@ashkulz ashkulz merged commit c31bd66 into wkhtmltopdf:wk_4.8.7 Jul 3, 2018
@ashkulz
Copy link
Member

ashkulz commented Jul 3, 2018

Thanks for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants