PDFium, beware

Stephan Bergmann sbergman at redhat.com
Sun Feb 11 14:29:01 UTC 2018


On 09.02.2018 19:53, Norbert Thiebaud wrote:
> On Fri, Feb 9, 2018 at 6:33 PM, Stephan Bergmann <sbergman at redhat.com> wrote:
>> Recent master --enable-pdfium has at
>> workdir/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator.h:31
>>
>>> // All Blink-supported systems have 4096 sized system pages and can handle
>>> // permissions and commit / decommit at this granularity.
>>> static const size_t kSystemPageSize = 4096;
> 
> and sysconf(_SC_PAGE_SIZE) is not working ?

At least not easily, no.  There's various static_asserts in 
workdir/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cpp 
involving kSystemPageSize that would fail if kSystemPageSize was 65536 
instead of 4096 (and those uses of static_assert would of course need to 
be done differently if kSystemPageSize wasn't a constant expression). 
That smells like the code as written indeed depends on specific 
qualities of kSystemPageSize.


More information about the LibreOffice mailing list