Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7888b5cd authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

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
parent 4ac1829d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment