Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stack overflow by adding a missing bang
The local `qProc` function in `Cardano.BM.Backend.Switchboard` loops by calling itself recursively, passing in the same `MVar MessageCounter` each time. However, `MessageCounter` was missing a bang on its `mcCountersMap` field, which contains `HM.HashMap Text Word64`. Even though the `HashMap` is a strict one, if you don't force it, you're still accumulating thunks. And as the `MVar` containing the `MessageCounter` was passed recursively, this resulted in a stack overflow instead of running out of (heap) memory. Fix it by adding the missing bang. This should fix IntersectMBO/cardano-node#370.
- Loading branch information