Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
art
Commits
b8c34ead
Commit
b8c34ead
authored
9 years ago
by
Nicolas Geoffray
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Download
Plain Diff
Merge "Revert "Remove double unloading hack""
parents
e2cfab50
e9cae495
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
runtime/common_runtime_test.cc
runtime/common_runtime_test.cc
+20
-0
No files found.
runtime/common_runtime_test.cc
View file @
b8c34ead
...
...
@@ -418,6 +418,26 @@ void CommonRuntimeTestImpl::TearDown() {
(
*
icu_cleanup_fn
)();
Runtime
::
Current
()
->
GetHeap
()
->
VerifyHeap
();
// Check for heap corruption after the test
// Manually closing the JNI libraries.
// Runtime does not support repeatedly doing JNI->CreateVM, thus we need to manually clean up the
// dynamic linking loader so that gtests would not fail.
// Bug: 25785594
if
(
runtime_
->
IsStarted
())
{
{
// We retrieve the handle by calling dlopen on the library. To close it, we need to call
// dlclose twice, the first time to undo our dlopen and the second time to actually unload it.
// See man dlopen.
void
*
handle
=
dlopen
(
"libjavacore.so"
,
RTLD_LAZY
);
dlclose
(
handle
);
CHECK_EQ
(
0
,
dlclose
(
handle
));
}
{
void
*
handle
=
dlopen
(
"libopenjdkd.so"
,
RTLD_LAZY
);
dlclose
(
handle
);
CHECK_EQ
(
0
,
dlclose
(
handle
));
}
}
}
static
std
::
string
GetDexFileName
(
const
std
::
string
&
jar_prefix
,
bool
host
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment