diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-08-30 11:14:40 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2013-08-30 11:21:09 -0400 |
commit | 85c1715d086bf2d35bc05133398f462919f2aa7b (patch) | |
tree | 798fa1ed229abaa696f89212094278a8fe4a84c8 /compiler/utils | |
parent | 160160ff51e0e90693e74b6b0f306292e6c61170 (diff) | |
download | haskell-85c1715d086bf2d35bc05133398f462919f2aa7b.tar.gz |
Fix off-by-one error in FastString.getFastStringTable (#8110)
The function was reading past the end of the FastString table, causing
the -dfaststring-stats option to behave unpredictably.
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/FastString.lhs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs index 25f98021f4..2800d8ab2e 100644 --- a/compiler/utils/FastString.lhs +++ b/compiler/utils/FastString.lhs @@ -530,7 +530,7 @@ nilFS = mkFastString "" getFastStringTable :: IO [[FastString]] getFastStringTable = do tbl <- readIORef string_table - buckets <- mapM (lookupTbl tbl) [0 .. hASH_TBL_SIZE] + buckets <- mapM (lookupTbl tbl) [0 .. hASH_TBL_SIZE-1] return buckets -- ----------------------------------------------------------------------------- |