Module Name:    src
Committed By:   riastradh
Date:           Thu Dec  7 17:24:22 UTC 2023

Modified Files:
        src/share/man/man7: stack.7

Log Message:
stack(7): Fix diagram of non-main thread stacks.

Had stackaddr (pthread_attr_setstack parameter, lowest-numbered
virtual address of stack region) confused with stack base (where the
stack grows from, which is the highest-numbered virtual address on
machines where stack grows down).

PR pkg/57708

XXX pullup-10


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man7/stack.7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man7/stack.7
diff -u src/share/man/man7/stack.7:1.5 src/share/man/man7/stack.7:1.6
--- src/share/man/man7/stack.7:1.5	Thu Dec  7 17:15:48 2023
+++ src/share/man/man7/stack.7	Thu Dec  7 17:24:22 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: stack.7,v 1.5 2023/12/07 17:15:48 riastradh Exp $
+.\"	$NetBSD: stack.7,v 1.6 2023/12/07 17:24:22 riastradh Exp $
 .\"
 .\" Copyright (c) 2023 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -191,14 +191,14 @@ thread's stack region by default, and th
 after creation.
 On architectures where the stack grows down, the layout is:
 .Bd -literal
-+--------------------+ stackaddr
++--------------------+ stack base = stackaddr + stacksize + guardsize
 | stack              |
 | .                  |
 | .                  | <-- stack pointer (varies during execution)
 | .                  |
-+--------------------+ stackaddr - stacksize
++--------------------+ stackaddr
 | guard/redzone      |
-+--------------------+ stackaddr - stacksize - guardsize
++--------------------+ stackaddr - guardsize
 .Ed
 .Pp
 On architectures where the stack grows up, the layout is:
@@ -210,7 +210,7 @@ On architectures where the stack grows u
 | .                  | <-- stack pointer (varies during execution)
 | .                  |
 | stack              |
-+--------------------+ stackaddr
++--------------------+ stack base = stackaddr
 .Ed
 .Pp
 The parameters stackaddr, stacksize, and guardsize can be obtained from

Reply via email to