NetBSD-Bugs archive

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

PR/59117 CVS commit: src



The following reply was made to PR lib/59117; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/59117 CVS commit: src
Date: Thu, 6 Mar 2025 00:54:27 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Mar  6 00:54:27 UTC 2025
 
 Modified Files:
 	src/lib/libc/gen: arc4random.c
 	src/tests/lib/libc/gen: t_arc4random.c
 
 Log Message:
 t_arc4random: Test arc4random_global.per_thread, not .initialized.
 
 If arc4random_initialize has been called, and thr_keycreate failed,
 then .initialized will be true but .per_thread will be false -- and
 .thread_key will be garbage (some other thread key for another
 purpose, most likely).  This path was enabled by allowing
 thr_keycreate to fail instead of aborting the process.
 
 This hasn't caused trouble yet, mainly because we don't do anything
 to inject faults into thr_keycreate in these tests.  Tweak the
 global_threadkeylimit test while here to provoke a crash with the
 wrong conditional.
 
 Fix a similar edge case in the little test program embedded in
 arc4random.c (which should maybe just go away now that we have atf
 tests).
 
 PR lib/59117: arc4random has some failure modes it shouldn't
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.44 -r1.45 src/lib/libc/gen/arc4random.c
 cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_arc4random.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