diff --git a/flake.nix b/flake.nix index a124728..252e03c 100644 --- a/flake.nix +++ b/flake.nix @@ -63,43 +63,6 @@ rec { # Setup the shell when entering the "nix develop" environment (bash script). shellHook = let - mkCmakeScript = type: let - typeLower = lib.toLower type; - in - pkgs.writers.writeFish "cmake-${typeLower}.fish" '' - cd $FLAKE_PROJECT_ROOT - - echo "Removing build directory ./cmake-build-${typeLower}/" - rm -rf ./cmake-build-${typeLower} - - echo "Creating build directory" - mkdir cmake-build-${typeLower} - cd cmake-build-${typeLower} - - echo "Running cmake" - cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" .. - - echo "Linking compile_commands.json" - cd .. - ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json - ''; - - cmakeDebug = mkCmakeScript "Debug"; - cmakeRelease = mkCmakeScript "Release"; - - mkBuildScript = type: let - typeLower = lib.toLower type; - in - pkgs.writers.writeFish "cmake-build.fish" '' - cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower} - - echo "Running cmake" - cmake --build . - ''; - - buildDebug = mkBuildScript "Debug"; - buildRelease = mkBuildScript "Release"; - # Add project-local fish abbrs here abbrs = { fail = "perl ./scripts/menu.pl"; diff --git a/scripts/menu.pl b/scripts/menu.pl index 602e641..517b0f2 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -46,10 +46,10 @@ my $db_port = "3306"; my $db_user = "smchurla"; my %handlers = ( - '01. Build Experiments' => sub { do "$local_scripts_dir/build.pl"; }, + '01. Build Experiments' => sub { do qq{$local_scripts_dir/build.pl}; }, '02. Deploy Experiments (Mars)' => - sub { do "$local_scripts_dir/deploy.pl"; }, + sub { do qq{$local_scripts_dir/deploy.pl}; }, '03. Archive Experiments (Downloads from Mars)' => sub { @@ -211,7 +211,7 @@ my %handlers = ( }, '10. Explore Experiment Results' => - sub { do "$local_scripts_dir/explore.pl" }, + sub { do qq{$local_scripts_dir/explore.pl}; }, '11. Compare Experiment Results' => sub { diff --git a/scripts/runner.pl b/scripts/runner.pl index c8bd524..90eba7a 100644 --- a/scripts/runner.pl +++ b/scripts/runner.pl @@ -219,14 +219,19 @@ sub inject { # "-Wf,--server-port=$fail_server_port", "-Wf,--state-dir=$remote_builds_dir/$experiment/state", "-Wf,--trap", + + # Catch invalid instruction pointers "-Wf,--catch-outerspace", + + # Messes with AOT compilation target if mmap memory is part of .text "-Wf,--catch-write-textsegment", + "-Wf,--timeout=500000", "-Wf,--ok-marker=fail_marker_positive", "-Wf,--fail-marker=fail_marker_negative", "-Wf,--detected-marker=fail_marker_detected", - # Called in WAMR exception handler + # Called in WAMR exception handler (disable for C compilation target!) "-Wf,--group1-marker=fail_marker_group1", ">/dev/null 2>&1"