[libc-commits] [libc] [libc] Improve the implementation of the rand() function (PR #66131)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Sep 12 12:54:59 PDT 2023


================
@@ -14,11 +14,18 @@
 #include <stdlib.h>
 
 TEST(LlvmLibcRandTest, UnsetSeed) {
+  static int vals[1000];
----------------
jhuber6 wrote:

It's a larger array, so putting `static` there places it in the `.bss` section instead of the stack which makes it less likely to explode when run on targets with a smaller stack (AKA the GPU).

https://github.com/llvm/llvm-project/pull/66131


More information about the libc-commits mailing list