[haiku-bugs] Re: [Haiku] #8233: Patch for pthread_attr_getguardsize

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Thu, 05 Apr 2012 10:25:10 -0000

#8233: Patch for pthread_attr_getguardsize
--------------------------+------------------------------------------------
   Reporter:  unitedroad  |      Owner:  bonefish
       Type:              |     Status:  assigned
  enhancement             |  Milestone:  R1
   Priority:  normal      |    Version:  R1/Development
  Component:              |   Keywords:  pthread, pthread_attr_getguardsize
  System/POSIX            |   Blocking:
 Resolution:              |   Platform:  All
 Blocked By:              |
Has a Patch:  1           |
--------------------------+------------------------------------------------

Comment (by bonefish):

 Replying to [comment:11 hamish]:
 > Also it seems I overlooked line 820 in vm.cpp: http://cgit.haiku-
 os.org/haiku/tree/src/system/kernel/vm/vm.cpp#n820. The stack guard page
 logic there is not actually used because the stack is mapped
 `REGION_NO_PRIVATE_MAP`, but for the sake of consistency should the
 private cache be created with the same guard size as the underlying cache?

 Yes it should. And `REGION_PRIVATE_MAP` is actually used also for stacks
 when they are CoW'ed -- otherwise after `fork()`ing one could write in the
 guard range. A new `VMCache` method will be needed to get the guard size.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8233#comment:12>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: