-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The persistent_test program (src/persistent/test.cpp) had a few bugs that made it sometimes fail even when the persistence system was working correctly: * Multiple test Persistent objects were declared as static variables, which meant they could be initialized in any order and could be initialized before the PersistentRegistry object they depend on due to the Static Initialization Order Fiasco. * The VariableBytes::from_bytes function declared an unused local VariableBytes object that could overflow the stack from trying to allocate its "buf" member. I fixed both of these bugs.
- Loading branch information
Showing
2 changed files
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters