WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit ff712687 authored by Javad Ebrahimian Amiri's avatar Javad Ebrahimian Amiri
Browse files

fixed test_jit errors

parent daef57b9
......@@ -8,4 +8,4 @@ export RUST_TEST_THREADS=1
export RUST_BACKTRACE=1
export MU_LOG_LEVEL=trace
export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$LD_LIBRARY_PATH
# export PYTHONPATH=mu-client-pypy
export PYTHONPATH=mu-client-pypy
......@@ -3162,22 +3162,35 @@ impl<'a> InstructionSelection {
// arguments should match the signature
assert_eq!(func_sig.arg_tys.len(), data.args.len());
let arg_values = self
.process_call_arguments(data, ops, f_content, f_context, vm);
let (stack_arg_size, arg_regs) = self.emit_precall_convention(
func_sig,
&arg_values,
data.convention,
f_context,
vm
);
// assert_eq!(func_sig.arg_tys.len(), data.args.len());
assert_eq!(stack_arg_size, 0, "SetTimer args do not fit in registers");
let tmp_arg = {
if data.args.len() == 0 {
self.make_nullref(vm)
}
else if data.args.len() == 1 {
let ref e_arg = ops[data.args[0]];
self.emit_ireg(e_arg, f_content, f_context, vm)
}
else {
panic!("SetTimer entry function can only have one argument of type futexref");
}
};
// let arg_values = self
// .process_call_arguments(data, ops, f_content, f_context, vm);
// let (stack_arg_size, arg_regs) = self.emit_precall_convention(
// func_sig,
// &arg_values,
// data.convention,
// f_context,
// vm
// );
//
// assert_eq!(stack_arg_size, 0, "SetTimer args do not fit in registers");
let mut args = vec![tmp_tmr, tmp_tm, tmp_prd, tmp_func];
args.extend(arg_regs);
let mut args = vec![tmp_tmr, tmp_tm, tmp_prd, tmp_func, tmp_arg];
// args.extend(arg_regs);
self.emit_runtime_entry(
&entrypoints::SETTIMER,
......
......@@ -124,7 +124,7 @@ fn sys_futex_lock_slowpath(futex_ptr: *mut u32, timeout_ns: u64) {
assert_eq!(
res, 0,
"FUTEX.lock slowpath failed with error code #{}",
res
unsafe { (*libc::__errno_location()) }
);
trace!("FUTEX.lock slowpath aquired #{:#?}", futex_ptr);
}
......
......@@ -2691,7 +2691,7 @@ impl<'lb, 'lvm> BundleLoader<'lb, 'lvm> {
}
NodeType::TypeThreadRef { id: _ } => MuType_::ThreadRef,
NodeType::TypeStackRef { id: _ } => MuType_::StackRef,
#[cfg(feature = "realtime")]
#[ cfg(feature = "realtime")]
NodeType::TypeRegionRef {id: _} => MuType_::RegionRef,
#[cfg(feature = "realtime")]
NodeType::TypeAttrRef { id: _ } => MuType_::AttrRef,
......
......@@ -48,7 +48,7 @@ AOT Compiler:
Garbage Collection:
--gc-disable-collection disable collection
--gc-immixspace-size=<kb> immix space size (default 65536kb = 64mb)
[default: 67108864]
[default: 536870912]
--gc-lospace-size=<kb> large object space size (default 65536kb = 64mb)
[default: 67108864]
--gc-nthreads=<n> number of threads for parallel gc [default: 8]
......
#!/usr/bin/env bash
export MU_ZEBU=$PWD/../../../mu-impl-fast/
export ZEBU_BUILD=debug
export ZEBU_BUILD=release
export DYLD_LIBRARY_PATH=$PWD
export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$PWD/emit/:$LD_LIBRARY_PATH
......
......@@ -999,15 +999,17 @@ def test_exception_stack_unwind():
assert fnp(0) == 20
assert fnp(100) == 10
def run_boot_image_sudo(entry, output, has_c_main_sig = False, args = [], impl=os.getenv('MU_IMPL', 'zebu'), vmargs = ""):
run_boot_image(entry, 'sudo ' + output, has_c_main_sig, args, impl, vmargs)
def run_boot_image(entry, output, has_c_main_sig = False, args = [], impl=os.getenv('MU_IMPL', 'zebu'), vmargs = ""):
def run_boot_image(entry, output, has_c_main_sig = False, args = [], impl=os.getenv('MU_IMPL', 'zebu'), vmargs = "", as_root=False):
from rpython.translator.interactive import Translation
from rpython.translator.platform import log as log_platform
if has_c_main_sig:
t = Translation(entry, [rffi.INT, rffi.CCHARPP], backend='mu', impl=impl, codegen='api', vmargs=vmargs, suplibdir=str(bin_dir))
t.driver.disable(['entrypoint_mu'])
else:
t = Translation(entry, None, backend='mu', impl=impl, codegen='c', vmargs=vmargs, suplibdir=str(bin_dir))
t = Translation(entry, None, backend='mu', impl=impl, codegen='api', vmargs=vmargs, suplibdir=str(bin_dir))
t.driver.standalone = True # force standalone
t.driver.exe_name = output
......@@ -1024,7 +1026,17 @@ def run_boot_image(entry, output, has_c_main_sig = False, args = [], impl=os.get
# zebu
exe.chmod(stat.S_IRWXU)
eci = rffi.ExternalCompilationInfo(library_dirs=[str(db.libsupport_path.dirpath())])
res = platform.execute(str(exe), args, compilation_info=eci)
if not as_root:
res = platform.execute(str(exe), args, compilation_info=eci)
else:
CUR_DIR = py.path.local('')
EMIT_DIR = py.path.local('./emit')
MU_ZEBU = py.path.local('./../../../mu-impl-fast/')
ZEBU_BUILD = 'debug'
TARGET_DIR = py.path.local('./../../../mu-impl-fast/target/%s/deps/' % ZEBU_BUILD)
root_prefix = ('sudo LD_LIBRARY_PATH=%s:$LD_LIBRARY_PATH ' % EMIT_DIR)
res = platform.execute(root_prefix + str(exe), args, compilation_info=eci)
else:
from rpython.rlib.rmu import holstein
runmu = py.path.local(holstein.mu_dir).join('..', 'tools', 'runmu.sh')
......@@ -1184,7 +1196,7 @@ def test_rpytarget_richards_measure_time():
print 'avg time =', (t1 - t0) / iterations
return 0
res = run_boot_image(main, str(bin_dir.join('test_richards_measure_time-mu')), args=['5'])
res = run_boot_image(main, str(bin_dir.join('test_richards_measure_time-mu')), args=['5'], as_root=False)
assert res.returncode == 0, res.err
@may_spawn_proc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment