Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-9] src



Module Name:    src
Committed By:   martin
Date:           Sat Dec  9 13:24:24 UTC 2023

Modified Files:
        src/distrib/sets/lists/debug [netbsd-9]: mi
        src/distrib/sets/lists/tests [netbsd-9]: mi
        src/lib/libpthread [netbsd-9]: pthread.c
        src/tests/lib/libpthread [netbsd-9]: Makefile
Added Files:
        src/tests/lib/libpthread [netbsd-9]: t_stack.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1775):

        tests/lib/libpthread/Makefile: revision 1.16
        lib/libpthread/pthread.c: revision 1.184
        distrib/sets/lists/debug/mi: revision 1.424
        distrib/sets/lists/tests/mi: revision 1.1297
        tests/lib/libpthread/t_stack.c: revision 1.1
        tests/lib/libpthread/t_stack.c: revision 1.2
        tests/lib/libpthread/t_stack.c: revision 1.3
        tests/lib/libpthread/t_stack.c: revision 1.4
        tests/lib/libpthread/t_stack.c: revision 1.5
        tests/lib/libpthread/t_stack.c: revision 1.6

pthread: Add tests for pthread user stack allocation.
PR lib/57721

libpthread/t_stack: Make this more robust to the guard size bug.
Make sure to allocate enough space for the thread's stack for a guard
even though there shouldn't be one, so that when we run the thread,
it doesn't start with the stack pointer pointing into someone else's
allocation (like malloc) causing stack frames to trash another data
structure -- or causing the user of that data structure to trash the
stack frames.
PR lib/57721

libpthread/t_stack: Omit needless cast in previous.
Arose from an earlier draft of the change.
PR lib/57721

libpthread/t_stack: Appease gcc12 maybe-uninitialized warning.
The jmp_buf is not, in fact, uninitialized at the point of use, but
it doesn't hurt to narrow the scope a bit to between when the jmp_buf
is initialized by setjmp, and when the signal handler might be called
after sigaction.
Noted by prlw1.
PR lib/57721

libpthread/t_stack: Fix format string for size_t.
Tested this on i386 since that had been crashing before, but i386
doesn't see %zu for unsigned int as a problem.
PR lib/57721

pthread: Don't adjust user-allocated stack addresses by guardsize.
PR lib/57721


To generate a diff of this commit:
cvs rdiff -u -r1.285.2.2 -r1.285.2.3 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.818.2.3 -r1.818.2.4 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.153.2.2 -r1.153.2.3 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.14 -r1.14.2.1 src/tests/lib/libpthread/Makefile
cvs rdiff -u -r0 -r1.6.4.2 src/tests/lib/libpthread/t_stack.c

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




Home | Main Index | Thread Index | Old Index