Commit 8d366a81 authored by Tom Cherry's avatar Tom Cherry
Browse files

Fix static classes in system properties

Previously, the functionality for mapping properties to contexts were
broken into a set of classes, each statically defined in
system_properties.cpp to prevent using new/malloc.  This is a mistake
however, since system property initialization happens before static
initialization, so it is possible for the Constructors of these
classes to clobber the initialized data.

This change fixes that by placing them in a Union and having that
Union have a no-op constructor.  The individual classes will be
initialized via placement new before they are used as is typically
done with classes in a union.

Test: boot bullhead
Change-Id: Ideb9d6ad8b6fc768811d8615d005cd4b8d134bce
parent f5a6fd20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment