dfc5909d0c83bd57e44d1f6018ce22d9c6a088c6
(This is a merge of http://go/wvgerrit/71330) The Service Certificate unit tests actually relied on the ability to call Properties::Init() multiple times to clear previous mutable state. Unfortunately, they didn't check the return code that could have told them their mutable state wasn't being cleared and instead proceeded to use a pointer which — depending on compiler — could be totally valid and allow the test to pass or could be invalid and cause a segfault. You can read the bug for a fuller explanation of the mechanics. The fix is twofold. First, the tests will now assert out if insertion into the property set map fails, preventing segfaults. Second, a helper has been added to Properties that allows tests interested in re-initializing Properties to do so. The default behavior for most tests remains the same: Properties can only be initialized once and subsequent calls to Properties::Init() are ignored. This patch also fixed a few formatting issues I noticed. Bug: 123099779 Test: Jenkins Unit Tests w/ GCC Test: CE CDM Unit Tests w/ GCC & Clang Change-Id: Ifd29f3ddf5cff934933cf47b92ecd12ab0a4a938
Description
No description provided