Avoid runtime namespace becoming parent for classloader-namespace.
Passing nullptr as parent namespace to android_create_namespace makes it use the namespace of the caller as parent, which typically is the runtime namespace. That in turn causes classloader-namespace to inherit any libraries in the shared group of the runtime namespace, i.e. any libraries that have been loaded in it with RTLD_GLOBAL or DF_1_GLOBAL up to that point. Let's instead pass the platform namespace from the linker config as fallback when a parent namespace cannot be found. That is also what happened before libnativeloader moved into the runtime namespace. Test: Flash and boot Test: atest CtsJniTestCases (on cuttlefish and taimen) Bug: 124501296 Change-Id: If2faee74e2bdcf95d19516faec340fedcdd07e29
Loading
Please register or sign in to comment