Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066)

Closed Sylvain Henry requested to merge hsyl20/ghc:hsyl20/check-bounds into master

Commit 1: fix the bug: bigNatIndex# in the where clause wasn't guarded by "bigNatIsZero a".

Commit 2: enabled -fcheck-prim-bounds in the validate flavour to make the test deterministically fail when the bug is present. It could be useful to detect other bugs too.

Commit 3: make the rts linker aware of rtsOutOfBoundsAccess symbol

Edited by Sylvain Henry

Merge request reports