Skip to content

Commit

Permalink
Fix attempt oracle#3
Browse files Browse the repository at this point in the history
  • Loading branch information
lazar-mitrovic committed May 8, 2020
1 parent ba961a1 commit 2c1f7ac
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static PointerBase dlmopen(Lmid_t lmid, String filename, int mode) {
* A single linking namespace is created lazily and registered on the NFI context instance.
*/
private static PointerBase loadLibraryInNamespace(long nativeContext, String name, int mode) {
assert (mode & singleton().isolatedNamespaceFlag) == 0;
assert (LibCBase.singleton().hasIsolatedNamespaces()) == false;
Target_com_oracle_truffle_nfi_impl_NFIContextLinux context = //
KnownIntrinsics.convertUnknownValue(getContext(nativeContext), Target_com_oracle_truffle_nfi_impl_NFIContextLinux.class);

Expand Down Expand Up @@ -147,8 +147,7 @@ private static PointerBase loadLibraryInNamespace(long nativeContext, String nam
@Override
protected long loadLibraryImpl(long nativeContext, String name, int flags) {
PointerBase handle;
if (Platform.includedIn(Platform.LINUX.class) && isolatedNamespaceFlag == ISOLATED_NAMESPACE_FLAG // constant folding
&& (flags & isolatedNamespaceFlag) != 0) {
if (Platform.includedIn(Platform.LINUX.class) && LibCBase.singleton().hasIsolatedNamespaces()) {
handle = loadLibraryInNamespace(nativeContext, name, flags & ~isolatedNamespaceFlag);
} else {
handle = PosixUtils.dlopen(name, flags);
Expand Down

0 comments on commit 2c1f7ac

Please sign in to comment.