Skip to content

Commit 438e077

Browse files
committed
Use emulated POSIX module backend in sandboxed mode
1 parent e84b253 commit 438e077

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,14 +1514,14 @@ def _register_vms(namespace):
15141514
'--experimental-options', '--engine.MultiTier=true',
15151515
]), SUITE, 10)
15161516
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_SANDBOXED, extra_polyglot_args=[
1517-
'--llvm.managed',
1517+
'--llvm.managed', '--python.PosixModuleBackend=java'
15181518
]), SUITE, 10)
15191519
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_NATIVE, extra_polyglot_args=[
15201520
]), SUITE, 10)
15211521
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_NATIVE_INTERPRETER, extra_polyglot_args=[
15221522
'--experimental-options', '--engine.Compilation=false']), SUITE, 10)
15231523
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_SANDBOXED_MULTI, extra_polyglot_args=[
1524-
'--experimental-options', '-multi-context', '--llvm.managed',
1524+
'--experimental-options', '-multi-context', '--llvm.managed', '--python.PosixModuleBackend=java'
15251525
]), SUITE, 10)
15261526
python_vm_registry.add_vm(GraalPythonVm(config_name=CONFIGURATION_NATIVE_MULTI, extra_polyglot_args=[
15271527
'--experimental-options', '-multi-context',

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ def __init__(self, config_name=CONFIGURATION_DEFAULT, distributions=None, cp_suf
414414
extra_polyglot_args=extra_polyglot_args, env=env)
415415

416416
def launcher_class(self):
417-
return 'com.oracle.graal.python.shell.GraalPythonMain'
417+
# We need to do it lazily because 'mx_graalpython' is importing this module
418+
from mx_graalpython import GRAALPYTHON_MAIN_CLASS
419+
return GRAALPYTHON_MAIN_CLASS
418420

419421
def run_in_graalvm(self, cwd, args, extra_polyglot_args, host_vm):
420422
with environ(self._env or {}):

0 commit comments

Comments
 (0)