Skip to content

Commit

Permalink
Print actual name of SoSources on WaitForAsyncInit recovery
Browse files Browse the repository at this point in the history
Summary: As in the title. Also, change logging level from warning to debug for ApkSoSource and propagate the IOException error when generating a general ULError.

Reviewed By: dcaspi

Differential Revision: D50168627

fbshipit-source-id: 5c536f50ba0bd94906de0a3d8b4e7bac69ad291c
  • Loading branch information
adicatana authored and facebook-github-bot committed Oct 11, 2023
1 parent 0677bdd commit 137b6b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/com/facebook/soloader/ApkSoSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ boolean shouldExtract(ZipEntry ze, String soName) {
File sysLibFile = new File(mLibDir, soName);
try {
if (!sysLibFile.getCanonicalPath().startsWith(mLibDir.getCanonicalPath())) {
LogUtil.w(
LogUtil.d(
TAG, "Not allowing consideration of " + zipPath + ": " + soName + " not in lib dir.");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion java/com/facebook/soloader/SoLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ private static void doLoadLibraryBySoName(
throw SoLoaderDSONotFoundError.create(soName, sApplicationContext, sSoSources);
} catch (IOException err) {
// General SoLoaderULError
SoLoaderULError error = new SoLoaderULError(soName);
SoLoaderULError error = new SoLoaderULError(soName, err.toString());
error.initCause(err);
throw error;
} finally {
Expand Down
2 changes: 1 addition & 1 deletion java/com/facebook/soloader/recovery/WaitForAsyncInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public boolean recover(UnsatisfiedLinkError e, SoSource[] soSources) {
for (SoSource soSource : soSources) {
if (soSource instanceof AsyncInitSoSource) {
AsyncInitSoSource source = (AsyncInitSoSource) soSource;
LogUtil.e(SoLoader.TAG, "Waiting on SoSource " + source.getClass().getName());
LogUtil.e(SoLoader.TAG, "Waiting on SoSource " + soSource.getName());
source.waitUntilInitCompleted();
}
}
Expand Down

0 comments on commit 137b6b5

Please sign in to comment.