Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066)
bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a".
Showing
- libraries/ghc-bignum/src/GHC/Num/BigNat.hs 8 additions, 7 deletionslibraries/ghc-bignum/src/GHC/Num/BigNat.hs
- testsuite/tests/numeric/should_run/T24066.hs 16 additions, 0 deletionstestsuite/tests/numeric/should_run/T24066.hs
- testsuite/tests/numeric/should_run/T24066.stdout 1 addition, 0 deletionstestsuite/tests/numeric/should_run/T24066.stdout
- testsuite/tests/numeric/should_run/all.T 1 addition, 0 deletionstestsuite/tests/numeric/should_run/all.T
Loading
Please register or sign in to comment