From 3c005d60194aadd92584258118c06782c9deab11 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Thu, 22 May 2014 17:53:01 -0700 Subject: [PATCH] Do not add arcs to the soinfo graph on dlopen While introducing RTLD_NOLOAD in b648a8a5 a change in how soinfo structs are connected was also introduced. When calling dlopen the library that is loaded is added as a child to the soinfo from which the caller comes - i.e. building a dependency graph. Unfortunately this shows issues upon unloading, such as blowing the stack if there are loops in the graph. This change reverts that part of b648a8a5, keeping everything as a child of the root soinfo. Change-Id: I604ee9210613b19f693a568158e69707620a95db Signed-off-by: Bjorn Andersson --- linker/linker.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/linker/linker.cpp b/linker/linker.cpp index 9f458b444..151d4cec4 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -841,9 +841,6 @@ soinfo* do_dlopen(const char* name, int flags, soinfo* caller, const android_dle soinfo* si = find_library(name, flags, extinfo); if (si != NULL) { si->CallConstructors(); - if (caller != NULL) { - caller->add_child(si); - } } protect_data(PROT_READ); return si;