Compare commits
158
Commits
main
..
9ca8e88ec0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ca8e88ec0
|
||
|
|
be2c4b7bf2
|
||
|
|
644603fb8b
|
||
|
|
0dccd1df46
|
||
|
|
9db4cb8bb1
|
||
|
|
10fe608a90 | ||
|
|
2de6e20675
|
||
|
|
bc98e2af5c
|
||
|
|
3819e84acb
|
||
|
|
6ce8987ebd
|
||
|
|
6859402483
|
||
|
|
32b1f3fa31
|
||
|
|
a6f33f1960
|
||
|
|
1bf4886c64
|
||
|
|
e33fed9b8d
|
||
|
|
c87409dd5c
|
||
|
|
5f6537b7ea
|
||
|
|
5bfe1a366b
|
||
|
|
f2559c8445
|
||
|
|
4d0693dd30
|
||
|
|
bba9ced348
|
||
|
|
a8aa0bbb07
|
||
|
|
1257534a64
|
||
|
|
5aab319424
|
||
|
|
348aac20ae
|
||
|
|
5da8fffed0
|
||
|
|
2b554a22ad
|
||
|
|
c76b0b8a8e
|
||
|
|
5f42323ccb
|
||
|
|
551335bf53
|
||
|
|
7bd3d205c9
|
||
|
|
59e36f6a7f
|
||
|
|
693378d059
|
||
|
|
1773e1d55a
|
||
|
|
99c32e1ac0
|
||
|
|
5ff6f6d0d8
|
||
|
|
6c7351b3d1
|
||
|
|
e36cfdc07d
|
||
|
|
7067c015bc
|
||
|
|
94ec38fa84
|
||
|
|
42817bab52
|
||
|
|
aec774c633
|
||
|
|
41ffcaeb08
|
||
|
|
41e079b977
|
||
|
|
371b323980
|
||
|
|
d1d6e4de34
|
||
|
|
a7e2c14529
|
||
|
|
7bbd30a6f8
|
||
|
|
8ea5aed355
|
||
|
|
264795bf71
|
||
|
|
ea56079c09
|
||
|
|
f45ce702d2
|
||
|
|
545b581659
|
||
|
|
353f971408
|
||
|
|
77d0cd7814
|
||
|
|
ed0a3b67de
|
||
|
|
51fb2ef4d4
|
||
|
|
0dbcaf68cd
|
||
|
|
19048ed4bf
|
||
|
|
495f74ade7
|
||
|
|
6125a3b9fc
|
||
|
|
7b31507403
|
||
|
|
aacc895800
|
||
|
|
116aa5f303
|
||
|
|
2d9837219c
|
||
|
|
fabf7745ee
|
||
|
|
5b316bbd64
|
||
|
|
9c7933e912
|
||
|
|
d925b19135
|
||
|
|
31d2b422cb
|
||
|
|
10bffc0fbc
|
||
|
|
f6989084ff
|
||
|
|
d345745962
|
||
|
|
f729cfbcd2
|
||
|
|
8a381d71cf
|
||
|
|
c092295520
|
||
|
|
7efa945977
|
||
|
|
40d40bc57b
|
||
|
|
5dd763fd8a
|
||
|
|
4d714a4442
|
||
|
|
540596c33d
|
||
|
|
cf319c5a72
|
||
|
|
e7cfc59096
|
||
|
|
d9e0d8d70d
|
||
|
|
b141ba1e38
|
||
|
|
959c9a8bee
|
||
|
|
86e3814fb2
|
||
|
|
a287df261c | ||
|
|
eebb596773
|
||
|
|
d45d367d89
|
||
|
|
038660c969
|
||
|
|
ca405f953b
|
||
|
|
c3ada55395
|
||
|
|
52e766e1c2
|
||
|
|
a10f04c83e
|
||
|
|
0d168bf759
|
||
|
|
94f3fc7611
|
||
|
|
5538e19c82
|
||
|
|
980025e5a1
|
||
|
|
18c3f13a71
|
||
|
|
3563a810a1
|
||
|
|
329014aada
|
||
|
|
e73ab0a788
|
||
|
|
bd7f09251e
|
||
|
|
187ad521cb
|
||
|
|
550ce0b079
|
||
|
|
fe6c2f5b99
|
||
|
|
89db76e555
|
||
|
|
28a3c37d41
|
||
|
|
39d2e1c51f
|
||
|
|
353dfae39c
|
||
|
|
e3b97ba865
|
||
|
|
fc1d3feadb
|
||
|
|
63231f8b48
|
||
|
|
07830e1976
|
||
|
|
f170ded33b
|
||
|
|
23f1d55feb
|
||
|
|
a10dc97616
|
||
|
|
d797e9f71c
|
||
|
|
ea6a009c0d
|
||
|
|
bc2eefface
|
||
|
|
a0ea3a3bbf
|
||
|
|
92ac5ec7d8
|
||
|
|
07ac6f6fc3
|
||
|
|
7b47a70448
|
||
|
|
96082f33aa
|
||
|
|
945c1fe0bc
|
||
|
|
5efff7c84e
|
||
|
|
83ae53768c
|
||
|
|
c8fb5d537d | ||
|
|
a6a335aaf4 | ||
|
|
5d4d84de39 | ||
|
|
8afdee2fd2 | ||
|
|
0d871c4e56 | ||
|
|
5e0b71a818 | ||
|
|
af70aebcff | ||
|
|
cacd2d8883 | ||
|
|
35dec73236 | ||
|
|
e23a3d5033 | ||
|
|
b500d56c8e | ||
|
|
8a0193408f | ||
|
|
129ba0e0b6 | ||
|
|
0f847d7d2d | ||
|
|
28d1db3b79 | ||
|
|
c1eb861bfb | ||
|
|
4b8a4ad0f1 | ||
|
|
a79219d39e | ||
|
|
593b88c3fd | ||
|
|
b1a8fe0c53 | ||
|
|
99608cc645 | ||
|
|
50c6e9adea | ||
|
|
66eb0b3814 | ||
|
|
078fdca44b | ||
|
|
744af52f76 | ||
|
|
43414edd0a | ||
|
|
679aeb24d4 | ||
|
|
facf04df7f | ||
|
|
86baf67fac |
@@ -6,4 +6,3 @@
|
||||
/db.conf
|
||||
/fail/bin/resultbrowser/app/__pycache__
|
||||
/fail/bin/VisualFAIL/CONFIGURATION.php
|
||||
/qemu.log
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
[submodule "fail/src"]
|
||||
path = fail/src
|
||||
url = git@gitos.rrze.fau.de:wasm-hardening/fail.git
|
||||
[submodule "wamr"]
|
||||
path = wamr
|
||||
url = ssh://git@git.cs.tu-dortmund.de:2222/christoph.urlacher/wamr.git
|
||||
[submodule "tacle-converter"]
|
||||
path = tacle-converter
|
||||
url = https://gitos.rrze.fau.de/i4/openaccess/tacle-bench-wasm-converter
|
||||
Vendored
-72
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "AOT Linux sum0_base",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-05-11T19:19:39_sum0_base-linux-aot/system.elf",
|
||||
"args": [],
|
||||
"cwd": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-05-11T19:19:39_sum0_base-linux-aot",
|
||||
"initCommands": [
|
||||
"settings set target.x86-disassembly-flavor intel",
|
||||
"breakpoint set -b main",
|
||||
"breakpoint set -b fail_start_trace",
|
||||
"breakpoint set -b fail_stop_trace",
|
||||
"breakpoint set -b fail_marker_positive",
|
||||
"breakpoint set -b fail_marker_negative",
|
||||
"breakpoint set -b invokeNative_Void",
|
||||
],
|
||||
"sourceMap": {
|
||||
"/build/source/core": "/home/christoph/Notes/TU/MastersThesis/05 WAMR/core",
|
||||
"/home/christoph/Notes/TU/MastersThesis/FailNix/build-sum0_base": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-05-11T19:19:39_sum0_base-linux-aot",
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "AOT Fail sum0_base (QEMU)",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "Launch QEMU (sum0_base fail-aot)",
|
||||
"initCommands": ["settings set target.x86-disassembly-flavor intel"],
|
||||
"processCreateCommands": ["gdb-remote localhost:9000", "continue"],
|
||||
"targetCreateCommands": [
|
||||
"target create /home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-04-27T21-42-42_sum0_base-fail-aot/system.elf",
|
||||
],
|
||||
"preRunCommands": [
|
||||
"breakpoint set -b os_main",
|
||||
"breakpoint set -b fail_start_trace",
|
||||
"breakpoint set -b fail_stop_trace",
|
||||
"breakpoint set -b fail_marker_positive",
|
||||
"breakpoint set -b fail_marker_negative",
|
||||
"breakpoint set -b invokeNative_Void",
|
||||
],
|
||||
"sourceMap": {
|
||||
"/build/source/core": "/home/christoph/Notes/TU/MastersThesis/05 WAMR/core",
|
||||
"/home/christoph/Notes/TU/MastersThesis/FailNix/build-sum0_base": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-04-27T21-42-42_sum0_base-fail-aot",
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "fail-x86-tracing-dbg",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "/nix/store/z3cyzvdz8pbxccp9jyxgp57ccjjppi1j-fail-1.0.0/bin/fail-x86-tracing",
|
||||
"args": [
|
||||
"-q", "-f", "./bochs.rc",
|
||||
"-Wf,--start-symbol=fail_start_trace",
|
||||
"-Wf,--save-symbol=fail_start_trace",
|
||||
"-Wf,--end-symbol=fail_stop_trace",
|
||||
"-Wf,--state-file=./state",
|
||||
"-Wf,--trace-file=./trace.pb",
|
||||
"-Wf,--elf-file=./system.elf",
|
||||
],
|
||||
"cwd": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-05-17T23-00-56_sum0_base-fail-aot",
|
||||
"initCommands": [
|
||||
"settings set target.x86-disassembly-flavor intel",
|
||||
"breakpoint set -n GenericTracing::run()",
|
||||
],
|
||||
"sourceMap": {
|
||||
"/home/fail/work": "/home/christoph/Notes/TU/MastersThesis/FailNix/fail/src",
|
||||
},
|
||||
}
|
||||
],
|
||||
}
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Launch QEMU (sum0_base fail-aot)",
|
||||
"type": "shell",
|
||||
"command": "qemu-system-i386 -drive file=system.iso,media=cdrom -boot d -m 32 -S -gdb tcp::9000",
|
||||
"options": {
|
||||
"cwd": "/home/christoph/Notes/TU/MastersThesis/FailNix/injections/2026-04-27T21-42-42_sum0_base-fail-aot",
|
||||
},
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "^(.*)$",
|
||||
"message": 1,
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": "^NEVER_MATCH$",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -6,16 +6,13 @@ library(ggalluvial)
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
argc <- length(args)
|
||||
|
||||
if (argc < 2 || argc > 3) {
|
||||
print("Expecting two or three arguments: exp1 exp2 [faults_file]")
|
||||
if (argc != 2) {
|
||||
print("Expecting two input files")
|
||||
stop()
|
||||
}
|
||||
|
||||
faults_file <- if (argc == 3) args[3] else "faults.csv"
|
||||
suffix <- gsub("^faults|\\.csv$", "", faults_file)
|
||||
|
||||
for (experiment in args[1:2]) {
|
||||
datafile <- file.path(experiment, faults_file)
|
||||
for (experiment in args) {
|
||||
datafile <- paste(experiment, "/faults.csv", sep = "")
|
||||
if (!file.exists(datafile)) {
|
||||
print(paste("Input file", datafile, "is missing"))
|
||||
stop()
|
||||
@@ -33,13 +30,13 @@ resulttype_labels <- c(
|
||||
)
|
||||
|
||||
# Read data
|
||||
datafile1 <- file.path(args[1], faults_file)
|
||||
datafile1 <- paste(args[1], "/faults.csv", sep = "")
|
||||
data1 <- readr::read_csv(datafile1)
|
||||
data1$fault_address <- strtoi(data1$fault_address)
|
||||
data1$resulttype <- resulttype_labels[data1$resulttype]
|
||||
# tibble::glimpse(data1)
|
||||
|
||||
datafile2 <- file.path(args[2], faults_file)
|
||||
datafile2 <- paste(args[2], "/faults.csv", sep = "")
|
||||
data2 <- readr::read_csv(datafile2)
|
||||
data2$fault_address <- strtoi(data2$fault_address)
|
||||
data2$resulttype <- resulttype_labels[data2$resulttype]
|
||||
@@ -78,6 +75,6 @@ plot <- ggplot(
|
||||
|
||||
# TODO: Name the file according to the benchmarks
|
||||
ggsave(
|
||||
paste0(args[2], "/../sankey", suffix, ".svg"),
|
||||
paste(args[2], "/../sankey.svg", sep = ""),
|
||||
plot = plot,
|
||||
)
|
||||
@@ -1,12 +1,10 @@
|
||||
library(ggplot2)
|
||||
|
||||
# Usage: Rscript single_result.r exp_abspath [resultsdata_file]
|
||||
# Usage: Rscript single_result.r exp_abspath
|
||||
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
experiment <- args[1]
|
||||
resultsdata_file <- if (length(args) >= 2) args[2] else "resultsdata.csv"
|
||||
suffix <- gsub("^resultsdata|\\.csv$", "", resultsdata_file)
|
||||
datafile <- file.path(experiment, resultsdata_file)
|
||||
datafile <- paste(experiment, "/resultsdata.csv", sep = "")
|
||||
|
||||
if (!file.exists(datafile)) {
|
||||
print(paste("Input file", datafile, "is missing"))
|
||||
@@ -23,6 +21,6 @@ plot <- ggplot(data, aes(x = benchmark, y = faults, fill = resulttype)) +
|
||||
theme_minimal()
|
||||
|
||||
ggsave(
|
||||
paste0(experiment, "/single_result", suffix, ".svg"),
|
||||
paste(experiment, "/single_result.svg", sep = ""),
|
||||
plot = plot,
|
||||
)
|
||||
@@ -6,9 +6,7 @@ library(ggplot2)
|
||||
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
experiment <- args[1]
|
||||
faults_file <- if (length(args) >= 2) args[2] else "faults.csv"
|
||||
suffix <- gsub("^faults|\\.csv$", "", faults_file)
|
||||
datafile <- file.path(experiment, faults_file)
|
||||
datafile <- paste(experiment, "/faults.csv", sep = "")
|
||||
|
||||
if (!file.exists(datafile)) {
|
||||
print(paste("Input file", datafile, "is missing"))
|
||||
@@ -29,6 +27,6 @@ plot <- ggplot(data, aes(x = fault_address, y = faults)) +
|
||||
theme_minimal()
|
||||
|
||||
ggsave(
|
||||
paste0(experiment, "/scatter", suffix, ".svg"),
|
||||
paste(experiment, "/scatter.svg", sep = ""),
|
||||
plot = plot,
|
||||
)
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
-1
Submodule fail/src deleted from dda6da2a50
@@ -12,388 +12,529 @@ rec {
|
||||
flake-utils,
|
||||
}:
|
||||
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
# =========================================================================================
|
||||
# Define pkgs/stdenvs
|
||||
# =========================================================================================
|
||||
pkgs = import nixpkgs {
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
# =========================================================================================
|
||||
# Define pkgs/stdenvs
|
||||
# =========================================================================================
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [];
|
||||
};
|
||||
|
||||
i386_pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [];
|
||||
|
||||
# Build crosscompiler
|
||||
crossSystem = {
|
||||
config = "i386-elf";
|
||||
libc = "newlib";
|
||||
};
|
||||
};
|
||||
|
||||
boost_pkgs =
|
||||
import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/824421b1796332ad1bcb35bc7855da832c43305f.tar.gz";
|
||||
sha256 = "sha256:1w6cjnakz1yi66rs8c6nmhymsr7bj82vs2hz200ipi1sfiq8dy4y";
|
||||
}) {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [];
|
||||
};
|
||||
|
||||
i386_pkgs = import nixpkgs {
|
||||
libdwarf_pkgs =
|
||||
import (builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/f597e7e9fcf37d8ed14a12835ede0a7d362314bd.tar.gz";
|
||||
sha256 = "sha256:1l79hh7jh7m8yc5mvc8dbg6s8rf30bgm994kf07xriqbzwfn158r";
|
||||
}) {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [];
|
||||
|
||||
# Build crosscompiler
|
||||
crossSystem = {
|
||||
config = "i386-elf";
|
||||
libc = "newlib";
|
||||
};
|
||||
};
|
||||
|
||||
boost_pkgs =
|
||||
import
|
||||
(builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/824421b1796332ad1bcb35bc7855da832c43305f.tar.gz";
|
||||
sha256 = "sha256:1w6cjnakz1yi66rs8c6nmhymsr7bj82vs2hz200ipi1sfiq8dy4y";
|
||||
})
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
inherit (pkgs) lib stdenv;
|
||||
|
||||
libdwarf_pkgs =
|
||||
import
|
||||
(builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/f597e7e9fcf37d8ed14a12835ede0a7d362314bd.tar.gz";
|
||||
sha256 = "sha256:1l79hh7jh7m8yc5mvc8dbg6s8rf30bgm994kf07xriqbzwfn158r";
|
||||
})
|
||||
{
|
||||
inherit system;
|
||||
};
|
||||
# =========================================================================================
|
||||
# Define shell environment
|
||||
# =========================================================================================
|
||||
|
||||
inherit (pkgs) lib stdenv;
|
||||
|
||||
# =========================================================================================
|
||||
# Define shell environment
|
||||
# =========================================================================================
|
||||
|
||||
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||
shellHook = let
|
||||
# Add project-local fish abbrs here
|
||||
abbrs = {
|
||||
fail = "perl ./scripts/menu.pl";
|
||||
|
||||
# C/C++:
|
||||
# cmake-debug = "${cmakeDebug}";
|
||||
# cmake-release = "${cmakeRelease}";
|
||||
# build-debug = "${buildDebug}";
|
||||
# build-release = "${buildRelease}";
|
||||
};
|
||||
|
||||
eraseAbbr = name: value: "abbr --erase ${name} 2>/dev/null";
|
||||
createAbbr = name: value: ''abbr -a ${name} "${value}"'';
|
||||
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets unset
|
||||
unloadProjectShell = pkgs.writers.writeFish "unload-shell.fish" ''
|
||||
echo "Unloading \"${description}\" environment..."
|
||||
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList eraseAbbr abbrs)}
|
||||
'';
|
||||
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets set
|
||||
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
|
||||
# Unload just in case, to not have redefinition errors
|
||||
source ${unloadProjectShell}
|
||||
|
||||
echo "Sourcing \"${description}\" environment..."
|
||||
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList createAbbr abbrs)}
|
||||
'';
|
||||
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||
shellHook = let
|
||||
mkCmakeScript = type: let
|
||||
typeLower = lib.toLower type;
|
||||
in
|
||||
builtins.concatStringsSep "\n" [
|
||||
# Launch into pure fish shell
|
||||
''
|
||||
# Can't do the "exec" with nix-direnv
|
||||
# - The "exec fish" would call direnv again => Infinite loop
|
||||
# - The shellHook is Bash/POSIX, so fish syntax doesn't work
|
||||
# exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
||||
cd $FLAKE_PROJECT_ROOT
|
||||
|
||||
# Determine the project root, used e.g. in cmake scripts
|
||||
export FLAKE_PROJECT_ROOT="$(git rev-parse --show-toplevel)"
|
||||
export INIT_PROJECT_SHELL="${initProjectShell}"
|
||||
export UNLOAD_PROJECT_SHELL="${unloadProjectShell}"
|
||||
''
|
||||
];
|
||||
echo "Removing build directory ./cmake-build-${typeLower}/"
|
||||
rm -rf ./cmake-build-${typeLower}
|
||||
|
||||
# ===========================================================================================
|
||||
# Define custom dependencies
|
||||
# ===========================================================================================
|
||||
echo "Creating build directory"
|
||||
mkdir cmake-build-${typeLower}
|
||||
cd cmake-build-${typeLower}
|
||||
|
||||
python = pkgs.python314.withPackages (
|
||||
p:
|
||||
with p; [
|
||||
setuptools
|
||||
flask
|
||||
flask-mysqldb
|
||||
pyyaml
|
||||
tabulate
|
||||
]
|
||||
);
|
||||
echo "Running cmake"
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
|
||||
|
||||
# perl = pkgs.perl.withPackages (p:
|
||||
# with p; [
|
||||
# # Those are already installed system-wide
|
||||
# # PLS
|
||||
# # PerlTidy
|
||||
#
|
||||
# NetOpenSSH
|
||||
# ]);
|
||||
|
||||
libpcl = stdenv.mkDerivation rec {
|
||||
pname = "libpcl1";
|
||||
version = "1.12-2";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://launchpadlibrarian.net/521269537/${pname}_${version}_amd64.deb";
|
||||
hash = "sha256-GL3mjPAccAtRMAJPnDMCHiDf6xNvGi4oUWylOIqBjP0=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
dpkg
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp -rv usr/lib/x86_64-linux-gnu/* $out/lib/
|
||||
|
||||
runHook postInstall
|
||||
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";
|
||||
|
||||
# C/C++:
|
||||
# cmake-debug = "${cmakeDebug}";
|
||||
# cmake-release = "${cmakeRelease}";
|
||||
# build-debug = "${buildDebug}";
|
||||
# build-release = "${buildRelease}";
|
||||
};
|
||||
|
||||
# Provides clang to compile C++ to Wasm
|
||||
wasi-sdk = stdenv.mkDerivation rec {
|
||||
pname = "wasi-sdk";
|
||||
version = "29";
|
||||
eraseAbbr = name: value: ''abbr --erase ${name} 2>/dev/null'';
|
||||
createAbbr = name: value: ''abbr -a ${name} "${value}"'';
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/WebAssembly/wasi-sdk/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/${pname}-${version}/${pname}-${version}.0-x86_64-linux.tar.gz";
|
||||
sha256 = "sha256:16afis71iqfvwiny4dz0lk9f7wbary0wa67ybwyhywr8g57ss6hq";
|
||||
};
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets unset
|
||||
unloadProjectShell = pkgs.writers.writeFish "unload-shell.fish" ''
|
||||
echo "Unloading \"${description}\" environment..."
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList eraseAbbr abbrs)}
|
||||
'';
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libgcc.lib
|
||||
];
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets set
|
||||
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
|
||||
# Unload just in case, to not have redefinition errors
|
||||
source ${unloadProjectShell}
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
echo "Sourcing \"${description}\" environment..."
|
||||
|
||||
mkdir -p $out
|
||||
cp -rv ./* $out/
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList createAbbr abbrs)}
|
||||
'';
|
||||
in
|
||||
builtins.concatStringsSep "\n" [
|
||||
# Launch into pure fish shell
|
||||
''
|
||||
# Can't do the "exec" with nix-direnv
|
||||
# - The "exec fish" would call direnv again => Infinite loop
|
||||
# - The shellHook is Bash/POSIX, so fish syntax doesn't work
|
||||
# exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
# Provides the iwasm interpreter
|
||||
iwasm = stdenv.mkDerivation rec {
|
||||
pname = "iwasm";
|
||||
version = "2.4.4";
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/WAMR-${version}/${pname}-${version}-x86_64-ubuntu-22.04.tar.gz";
|
||||
sha256 = "sha256:05irihz3yf7hpc0a59qz9i62imhrsni9xy9nxwsn6b8s92c1yzrp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libz
|
||||
zstd
|
||||
libgcc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -rv ./* $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
# Provides the wamrc compiler
|
||||
wamrc = stdenv.mkDerivation rec {
|
||||
pname = "wamrc";
|
||||
version = "2.4.4";
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/WAMR-${version}/${pname}-${version}-x86_64-ubuntu-22.04.tar.gz";
|
||||
sha256 = "sha256:0264arh03gc35z0zdvw07qdvqgfvsxr3qgl1aszghwicmdmh4sqj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libz
|
||||
zstd
|
||||
libgcc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -rv ./* $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
# ===========================================================================================
|
||||
# Specify dependencies
|
||||
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
|
||||
# Just for a "nix develop" shell, buildInputs can be used for everything.
|
||||
# ===========================================================================================
|
||||
|
||||
# Add dependencies to nativeBuildInputs if they are executed during the build:
|
||||
# - Those which are needed on $PATH during the build, for example cmake and pkg-config
|
||||
# - Setup hooks, for example makeWrapper/autoPatchelfHook
|
||||
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cmake
|
||||
gdb
|
||||
xxd
|
||||
wabt
|
||||
grub2
|
||||
xorriso
|
||||
mariadb.client
|
||||
# dbeaver-bin
|
||||
# beekeeper-studio
|
||||
# tableplus
|
||||
lazysql
|
||||
iwasm
|
||||
wamrc
|
||||
fail-bin
|
||||
php
|
||||
qemu_kvm
|
||||
|
||||
# perl
|
||||
|
||||
# Don't install to not pollute our PATH. Just export as environment variable.
|
||||
# wasi-sdk
|
||||
# libiwasm_debug
|
||||
# libiwasm_release
|
||||
# Determine the project root, used e.g. in cmake scripts
|
||||
export FLAKE_PROJECT_ROOT="$(git rev-parse --show-toplevel)"
|
||||
export INIT_PROJECT_SHELL="${initProjectShell}"
|
||||
export UNLOAD_PROJECT_SHELL="${unloadProjectShell}"
|
||||
''
|
||||
];
|
||||
|
||||
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
|
||||
# - Libraries used by compilers, for example zlib
|
||||
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
|
||||
buildInputs = with pkgs; [];
|
||||
# ===========================================================================================
|
||||
# Define custom dependencies
|
||||
# ===========================================================================================
|
||||
|
||||
# ===========================================================================================
|
||||
# Define buildable + installable packages
|
||||
# ===========================================================================================
|
||||
python = pkgs.python314.withPackages (p:
|
||||
with p; [
|
||||
setuptools
|
||||
flask
|
||||
flask-mysqldb
|
||||
pyyaml
|
||||
]);
|
||||
|
||||
fail-bin = stdenv.mkDerivation {
|
||||
pname = "fail";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
# perl = pkgs.perl.withPackages (p:
|
||||
# with p; [
|
||||
# # Those are already installed system-wide
|
||||
# # PLS
|
||||
# # PerlTidy
|
||||
#
|
||||
# NetOpenSSH
|
||||
# ]);
|
||||
|
||||
libpcl = stdenv.mkDerivation rec {
|
||||
pname = "libpcl1";
|
||||
version = "1.12-2";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "http://launchpadlibrarian.net/521269537/${pname}_${version}_amd64.deb";
|
||||
hash = "sha256-GL3mjPAccAtRMAJPnDMCHiDf6xNvGi4oUWylOIqBjP0=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
dpkg
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp -rv usr/lib/x86_64-linux-gnu/* $out/lib/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
wasi-sdk = stdenv.mkDerivation rec {
|
||||
pname = "wasi-sdk";
|
||||
version = "29";
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/WebAssembly/wasi-sdk/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/${pname}-${version}/${pname}-${version}.0-x86_64-linux.tar.gz";
|
||||
sha256 = "sha256:16afis71iqfvwiny4dz0lk9f7wbary0wa67ybwyhywr8g57ss6hq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libgcc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -rv ./* $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
iwasm = stdenv.mkDerivation rec {
|
||||
pname = "iwasm";
|
||||
version = "2.4.4";
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/WAMR-${version}/${pname}-${version}-x86_64-ubuntu-22.04.tar.gz";
|
||||
sha256 = "sha256:05irihz3yf7hpc0a59qz9i62imhrsni9xy9nxwsn6b8s92c1yzrp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libz
|
||||
zstd
|
||||
libgcc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -rv ./* $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
wamrc = stdenv.mkDerivation rec {
|
||||
pname = "wamrc";
|
||||
version = "2.4.4";
|
||||
|
||||
src = let
|
||||
baseurl = "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download";
|
||||
in
|
||||
builtins.fetchTarball {
|
||||
url = "${baseurl}/WAMR-${version}/${pname}-${version}-x86_64-ubuntu-22.04.tar.gz";
|
||||
sha256 = "sha256:0264arh03gc35z0zdvw07qdvqgfvsxr3qgl1aszghwicmdmh4sqj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
libz
|
||||
zstd
|
||||
libgcc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -rv ./* $out/bin/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
wamr = stdenv.mkDerivation {
|
||||
pname = "wamr";
|
||||
version = "2.4.4";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "gitea.local.chriphost.de";
|
||||
owner = "christoph";
|
||||
repo = "wamr";
|
||||
rev = "fd69a4e76ec0d384bd79f514772b7dfa240fc0d7";
|
||||
hash = "sha256-rlCx4isI0k6rC9E0hWIA9LeinqiACug7zxj9z/e4SBQ=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -rv ./* $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
mkLibiwasm = {
|
||||
buildenv,
|
||||
platform,
|
||||
buildtype,
|
||||
cflags,
|
||||
extraCmakeFlags ? [],
|
||||
}:
|
||||
buildenv.mkDerivation {
|
||||
pname = "libiwasm";
|
||||
version = "2.4.4";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "gitea.local.chriphost.de";
|
||||
owner = "christoph";
|
||||
# domain = "git.cs.tu-dortmund.de";
|
||||
# owner = "christoph.urlacher";
|
||||
repo = "wamr";
|
||||
|
||||
# With mmap_space in .text.wamr_aot
|
||||
rev = "cda2009deb85511089b04b0ac736ad4da2d07e58";
|
||||
hash = "sha256-CN6xTiwzF4Jbrpf21TF5c/C03Xb3urwkibRuIXjoU/w=";
|
||||
|
||||
# Without mmap_space in .text.wamr_aot
|
||||
# rev = "4e7aed33fe53bf3ee4a3f2fe582c74816f850759";
|
||||
# hash = "sha256-/4BKwoFDRfkA+DmbWagxdtkCDAED5rxbz5e4xvjvVWU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [cmake];
|
||||
|
||||
dontStrip = true;
|
||||
cmakeBuildType = buildtype;
|
||||
cmakeFlags =
|
||||
extraCmakeFlags
|
||||
++ [
|
||||
"-DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
"-DCMAKE_COLOR_DIAGNOSTICS=ON"
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
"-DWAMR_BUILD_PLATFORM=${platform}"
|
||||
"-DWAMR_BUILD_TARGET=X86_32"
|
||||
"-DWAMR_BUILD_AOT=1"
|
||||
"-DWAMR_BUILD_WAMR_COMPILER=0"
|
||||
"-DWAMR_BUILD_INTERP=1"
|
||||
"-DWAMR_BUILD_FAST_INTERP=0"
|
||||
"-DWAMR_BUILD_JIT=0"
|
||||
"-DWAMR_BUILD_FAST_JIT=0"
|
||||
"-DWAMR_BUILD_LIBC_BUILTIN=1"
|
||||
"-DWAMR_BUILD_LIBC_WASI=0"
|
||||
"-DWAMR_BUILD_SIMD=0"
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# FAIL runtime dependencies
|
||||
python # bochs-experiment-runner.py, resultbrowser.py
|
||||
|
||||
# For old VSS FAIL
|
||||
# alsa-lib # libasound.so.2
|
||||
# boost_pkgs.boost174 # libboost_coroutine.so.1.74.0, libboost_regex.so.1.74.0, libboost_thread.so.1.74.0
|
||||
# capstone_4 # libcapstone.so.4
|
||||
# libdwarf_pkgs.libdwarf # libdwarf.so.1
|
||||
# elfutils # libelf.so.1
|
||||
# mariadb # libmariadb.so.3
|
||||
# libpcl # libpcl.so.1
|
||||
# protobuf_21 # libprotobuf.so.32
|
||||
# SDL # libSDL-1.2.so.0
|
||||
# libx11 # libX11.so.6
|
||||
# libxrandr # libXrandr.so.2
|
||||
# libz # libz.so.1
|
||||
|
||||
# For current FAIL
|
||||
boost183
|
||||
capstone # libcapstone.so.5
|
||||
libdwarf_pkgs.libdwarf # libdwarf.so.1
|
||||
elfutils # libelf.so.1
|
||||
mariadb # libmariadb.so.3
|
||||
protobuf_21 # libprotobuf.so.32
|
||||
libz # libz.so.1
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -rv ./fail/bin $out/bin
|
||||
cp -rv ./fail/share $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
# Provide package for "nix build"
|
||||
packages = {
|
||||
default = fail-bin;
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
};
|
||||
apps = {
|
||||
default = flake-utils.lib.mkApp {drv = fail-bin;};
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
# Since GCC 15, implicit declarations are an error. Disable this.
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration " + cflags;
|
||||
};
|
||||
|
||||
devShells = {
|
||||
# Provide default environment for "nix develop".
|
||||
# Other environments can be added below.
|
||||
default = pkgs.mkShell {
|
||||
inherit nativeBuildInputs buildInputs shellHook;
|
||||
name = description;
|
||||
libiwasm-baremetal-debug = mkLibiwasm {
|
||||
buildenv = i386_pkgs.stdenv;
|
||||
platform = "baremetal";
|
||||
buildtype = "Debug";
|
||||
cflags = "-O0 -ggdb3";
|
||||
extraCmakeFlags = [
|
||||
"-DCMAKE_SYSTEM_NAME=Generic"
|
||||
"-DCMAKE_SYSTEM_PROCESSOR=i386"
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
];
|
||||
};
|
||||
libiwasm-baremetal-release = mkLibiwasm {
|
||||
buildenv = i386_pkgs.stdenv;
|
||||
platform = "baremetal";
|
||||
buildtype = "MinSizeRel";
|
||||
cflags = "-O2 -ggdb3 -DNDEBUG";
|
||||
extraCmakeFlags = [
|
||||
"-DCMAKE_SYSTEM_NAME=Generic"
|
||||
"-DCMAKE_SYSTEM_PROCESSOR=i386"
|
||||
"-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
|
||||
];
|
||||
};
|
||||
|
||||
# =========================================================================================
|
||||
# Define environment variables
|
||||
# =========================================================================================
|
||||
libiwasm-linux-debug = mkLibiwasm {
|
||||
buildenv = pkgs.multiStdenv;
|
||||
platform = "linux";
|
||||
buildtype = "Debug";
|
||||
cflags = "-O0 -ggdb3";
|
||||
};
|
||||
libiwasm-linux-release = mkLibiwasm {
|
||||
buildenv = pkgs.multiStdenv;
|
||||
platform = "linux";
|
||||
buildtype = "MinSizeRel";
|
||||
cflags = "-O2 -ggdb3 -DNDEBUG";
|
||||
};
|
||||
|
||||
# Dynamic libraries from buildinputs:
|
||||
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
# ===========================================================================================
|
||||
# Specify dependencies
|
||||
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
|
||||
# Just for a "nix develop" shell, buildInputs can be used for everything.
|
||||
# ===========================================================================================
|
||||
|
||||
# Those are read by compile.pl / build.pl
|
||||
FAIL_SHARE = "${fail-bin}/share";
|
||||
FAIL_PYTHON = "${python}/bin/python";
|
||||
WASI_ROOT = wasi-sdk;
|
||||
WAMR_ROOT = "/home/christoph/Notes/TU/MastersThesis/FailNix/wamr";
|
||||
CROSS_CC = "${i386_pkgs.stdenv.cc}/bin/i386-elf-gcc";
|
||||
CROSS_CXX = "${i386_pkgs.stdenv.cc}/bin/i386-elf-g++";
|
||||
LINUX_CC = "${pkgs.multiStdenv.cc}/bin/gcc";
|
||||
LINUX_CXX = "${pkgs.multiStdenv.cc}/bin/g++";
|
||||
};
|
||||
# Add dependencies to nativeBuildInputs if they are executed during the build:
|
||||
# - Those which are needed on $PATH during the build, for example cmake and pkg-config
|
||||
# - Setup hooks, for example makeWrapper/autoPatchelfHook
|
||||
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
|
||||
nativeBuildInputs = with pkgs; [
|
||||
just
|
||||
gdb
|
||||
xxd
|
||||
wabt
|
||||
grub2
|
||||
xorriso
|
||||
mariadb.client
|
||||
# dbeaver-bin
|
||||
# beekeeper-studio
|
||||
# tableplus
|
||||
lazysql
|
||||
iwasm
|
||||
wamrc
|
||||
fail-bin
|
||||
php
|
||||
|
||||
# perl
|
||||
|
||||
# Don't install to not pollute our PATH. Just export as environment variable.
|
||||
# wasi-sdk
|
||||
# libiwasm_debug
|
||||
# libiwasm_release
|
||||
];
|
||||
|
||||
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
|
||||
# - Libraries used by compilers, for example zlib
|
||||
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
|
||||
buildInputs = with pkgs; [];
|
||||
|
||||
# ===========================================================================================
|
||||
# Define buildable + installable packages
|
||||
# ===========================================================================================
|
||||
|
||||
fail-bin = stdenv.mkDerivation {
|
||||
pname = "fail";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# FAIL runtime dependencies
|
||||
python # bochs-experiment-runner.py, resultbrowser.py
|
||||
|
||||
# For old VSS FAIL
|
||||
# alsa-lib # libasound.so.2
|
||||
# boost_pkgs.boost174 # libboost_coroutine.so.1.74.0, libboost_regex.so.1.74.0, libboost_thread.so.1.74.0
|
||||
# capstone_4 # libcapstone.so.4
|
||||
# libdwarf_pkgs.libdwarf # libdwarf.so.1
|
||||
# elfutils # libelf.so.1
|
||||
# mariadb # libmariadb.so.3
|
||||
# libpcl # libpcl.so.1
|
||||
# protobuf_21 # libprotobuf.so.32
|
||||
# SDL # libSDL-1.2.so.0
|
||||
# libx11 # libX11.so.6
|
||||
# libxrandr # libXrandr.so.2
|
||||
# libz # libz.so.1
|
||||
|
||||
# For current FAIL
|
||||
boost183
|
||||
capstone # libcapstone.so.5
|
||||
libdwarf_pkgs.libdwarf # libdwarf.so.1
|
||||
elfutils # libelf.so.1
|
||||
mariadb # libmariadb.so.3
|
||||
protobuf_21 # libprotobuf.so.32
|
||||
libz # libz.so.1
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -rv ./fail/bin $out/bin
|
||||
cp -rv ./fail/share $out/share
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
# Provide package for "nix build"
|
||||
packages = {
|
||||
default = fail-bin;
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
};
|
||||
apps = {
|
||||
default = flake-utils.lib.mkApp {drv = fail-bin;};
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
};
|
||||
|
||||
devShells = {
|
||||
# Provide default environment for "nix develop".
|
||||
# Other environments can be added below.
|
||||
default = pkgs.mkShell {
|
||||
inherit nativeBuildInputs buildInputs shellHook;
|
||||
name = description;
|
||||
|
||||
# =========================================================================================
|
||||
# Define environment variables
|
||||
# =========================================================================================
|
||||
|
||||
# Dynamic libraries from buildinputs:
|
||||
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
|
||||
|
||||
JUST_WORKING_DIRECTORY = "/home/christoph/Notes/TU/MastersThesis/FailNix";
|
||||
JUST_JUSTFILE = "/home/christoph/Notes/TU/MastersThesis/FailNix/scripts/nixos.just";
|
||||
|
||||
# Those are read by the justfile
|
||||
FAIL_SHARE = "${fail-bin}/share";
|
||||
WASI_ROOT = wasi-sdk;
|
||||
WAMR_ROOT = wamr;
|
||||
LIBIWASM_DEBUG = "${libiwasm-baremetal-debug}/lib";
|
||||
LIBIWASM_RELEASE = "${libiwasm-baremetal-release}/lib";
|
||||
LIBIWASM_LINUX_DEBUG = "${libiwasm-linux-debug}/lib";
|
||||
LIBIWASM_LINUX_RELEASE = "${libiwasm-linux-release}/lib";
|
||||
CROSS_CC = "${i386_pkgs.stdenv.cc}/bin/i386-elf-gcc";
|
||||
CROSS_CXX = "${i386_pkgs.stdenv.cc}/bin/i386-elf-g++";
|
||||
LINUX_CC = "${pkgs.multiStdenv.cc}/bin/gcc";
|
||||
LINUX_CXX = "${pkgs.multiStdenv.cc}/bin/g++";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PROJECT>
|
||||
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||
<SAVE_STATE>
|
||||
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||
<A VALUE="06-09_13-57-11_sum0_c_fail:" />
|
||||
</ARRAY>
|
||||
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||
</SAVE_STATE>
|
||||
</PROJECT_DATA_XML_NAME>
|
||||
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||
</TOOL_MANAGER>
|
||||
</PROJECT>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PROJECT>
|
||||
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||
<SAVE_STATE>
|
||||
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||
<A VALUE="06-09_22-34-26_sum0_aot_fail:" />
|
||||
</ARRAY>
|
||||
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||
</SAVE_STATE>
|
||||
</PROJECT_DATA_XML_NAME>
|
||||
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||
</TOOL_MANAGER>
|
||||
</PROJECT>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<PROJECT>
|
||||
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||
<SAVE_STATE>
|
||||
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||
<A VALUE="06-10_21-32-23_sum0_interp_fail:" />
|
||||
</ARRAY>
|
||||
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||
</SAVE_STATE>
|
||||
</PROJECT_DATA_XML_NAME>
|
||||
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||
</TOOL_MANAGER>
|
||||
</PROJECT>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
-6
@@ -33,8 +33,8 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
int skipped = 0;
|
||||
int lineNo = 0;
|
||||
|
||||
// CSV columns: (benchmark, resulttype, faults, fault_address, mnemonic)
|
||||
// Example: (ip , OK_MARKER , 4311 , 0x10001B , mov)
|
||||
// CSV columns: (benchmark, resulttype, faults, fault_address)
|
||||
// Example: (ip , OK_MARKER , 4311 , 0x10001B )
|
||||
try (BufferedReader br = new BufferedReader(new FileReader(input))) {
|
||||
String line;
|
||||
while ((line = br.readLine()) != null) {
|
||||
@@ -47,7 +47,7 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
|
||||
// Make sure to always use "," delimiter and never quotations
|
||||
String[] parts = line.split(",");
|
||||
if (parts.length != 5) {
|
||||
if (parts.length != 4) {
|
||||
skipped++;
|
||||
printerr("Line " + lineNo + ": malformed");
|
||||
continue;
|
||||
@@ -57,13 +57,11 @@ public class ImportMarkersAsBookmarks extends GhidraScript {
|
||||
String typeText = parts[1].trim();
|
||||
String countText = parts[2].trim();
|
||||
String addrText = parts[3].trim();
|
||||
String mnemonicText = parts[4].trim();
|
||||
|
||||
if (benchText.isEmpty()
|
||||
|| typeText.isEmpty()
|
||||
|| countText.isEmpty()
|
||||
|| addrText.isEmpty()
|
||||
|| mnemonicText.isEmpty()) {
|
||||
|| addrText.isEmpty()) {
|
||||
skipped++;
|
||||
printerr("Line " + lineNo + ": malformed");
|
||||
continue;
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
BIN
Binary file not shown.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
BIN
Binary file not shown.
|
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
|
BIN
Binary file not shown.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user