[haiku-bugs] Re: [Haiku] #15804: WebKit: crash in incrementPageOccupancy

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 21 Mar 2020 17:03:13 -0000

#15804: WebKit: crash in incrementPageOccupancy
----------------------------------------+----------------------------
   Reporter:  X512                      |      Owner:  pulkomandy
       Type:  bug                       |     Status:  new
   Priority:  normal                    |  Milestone:  Unscheduled
  Component:  Applications/WebPositive  |    Version:  R1/Development
 Resolution:                            |   Keywords:
 Blocked By:                            |   Blocking:
Has a Patch:  0                         |   Platform:  All
----------------------------------------+----------------------------
Comment (by KapiX):

 I figured it out but I'm not sure how to fix it.

 By dumping all commits I found that crash occurs when WebKit tries to
 expand existing commit. For example first call wants 4096 bytes, next one
 wants 32768 under the same address. It doesn't decommit it first.

 Windows doesn't care, VirtualAlloc(MEM_COMMIT) docs:

An attempt to commit a page that is already committed does not cause the
 function to fail. This means that you can commit pages without first
 determining the current commitment state of each page.

 POSIX implementation uses mprotect.

 Our implementation uses mmap, which is too much. We can't munmap ad-hoc,
 because we don't have length of existing mapping.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15804#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: