Commit cbf41ee
authored
Fix msan error in Multinom
With a new version of llvm+clang, msan becomes more clever and catches the following use-of-uninitialized-memory error.
```
==793==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7fee2bf29ed7 in Multinom third_party/testu01/testu01_1_2_3/testu01/smultin.c:2203:7
#1 0x7fee2bf25d6e in smultin_Multinomial third_party/testu01/testu01_1_2_3/testu01/smultin.c:2313:4
#2 0x7fee2bf0f022 in sknuth_Permutation third_party/testu01/testu01_1_2_3/testu01/sknuth.c:639:7
```
We're invoking this as
```
sres_Chi2* res = sres_CreateChi2();
sknuth_Permutation(&gen_, res, p.N, p.n, p.r, p.t);
```
with `N=1`, `n=50'000'000`, `r=0`, and `t=10`.1 parent 7519ac6 commit cbf41ee
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2109 | 2109 | | |
2110 | 2110 | | |
2111 | 2111 | | |
2112 | | - | |
| 2112 | + | |
2113 | 2113 | | |
2114 | 2114 | | |
2115 | 2115 | | |
| |||
0 commit comments