Commit 85c1715d authored by parcs's avatar parcs
Browse files

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.
parent 160160ff
......@@ -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
-- -----------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment