Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89db76e555
|
||
|
|
28a3c37d41
|
||
|
|
39d2e1c51f
|
@@ -9,9 +9,9 @@ trace module:
|
||||
-e {{ BUILD_DIR }}-{{ module }}/system.elf \
|
||||
-i {{ BUILD_DIR }}-{{ module }}/system.iso \
|
||||
-- \
|
||||
-Wf,--start-symbol=start_trace \
|
||||
-Wf,--save-symbol=start_trace \
|
||||
-Wf,--end-symbol=stop_trace \
|
||||
-Wf,--start-symbol=fail_start_trace \
|
||||
-Wf,--save-symbol=fail_start_trace \
|
||||
-Wf,--end-symbol=fail_stop_trace \
|
||||
-Wf,--state-file={{ BUILD_DIR }}-{{ module }}/state \
|
||||
-Wf,--trace-file={{ BUILD_DIR }}-{{ module }}/trace.pb \
|
||||
-Wf,--elf-file={{ BUILD_DIR }}-{{ module }}/system.elf
|
||||
@@ -62,7 +62,7 @@ import module:
|
||||
[group("4: fail")]
|
||||
server module:
|
||||
{{ FAIL_SERVER }} \
|
||||
--port {{FAIL_SERVER_PORT}} \
|
||||
--port {{ FAIL_SERVER_PORT }} \
|
||||
--database-option-file ./db.conf \
|
||||
-v {{ module }} \
|
||||
-b % \
|
||||
@@ -87,12 +87,13 @@ client module:
|
||||
-i {{ BUILD_DIR }}-{{ module }}/system.iso \
|
||||
-j {{ num_cpus() }} \
|
||||
-- \
|
||||
-Wf,--server-port={{FAIL_SERVER_PORT}} \
|
||||
-Wf,--server-port={{ FAIL_SERVER_PORT }} \
|
||||
-Wf,--state-dir={{ BUILD_DIR }}-{{ module }}/state \
|
||||
-Wf,--trap \
|
||||
-Wf,--timeout=500000 \
|
||||
-Wf,--ok-marker=ok_marker \
|
||||
-Wf,--fail-marker=fail_marker \
|
||||
-Wf,--ok-marker=fail_marker_positive \
|
||||
-Wf,--fail-marker=fail_marker_negative \
|
||||
-Wf,--detected-marker=fail_marker_detected \
|
||||
> /dev/null
|
||||
@echo "Next step: \"just result {{ module }}\" or \"just resultbrowser\""
|
||||
|
||||
@@ -127,4 +128,4 @@ result-csv module:
|
||||
[doc("Start the FAIL* resultbrowser")]
|
||||
[group("4: fail")]
|
||||
resultbrowser:
|
||||
{{ RESULT_BROWSER }} -c ./db.conf --host=0.0.0.0 --port={{RESULTBROWSER_PORT}}
|
||||
{{ RESULT_BROWSER }} -c ./db.conf --host=0.0.0.0 --port={{ RESULTBROWSER_PORT }}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<?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="2026-04-07_20-53_cored_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.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
<?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="2026-04-07_21-44_cored_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.
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.
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.
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.
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.
BIN
Binary file not shown.
+45
-9
@@ -1,17 +1,53 @@
|
||||
#include "lib.h"
|
||||
#include "../lib.h"
|
||||
#include "../lib_cored.h"
|
||||
|
||||
void fail_start_trace(void) {}
|
||||
void fail_stop_trace(void) {}
|
||||
void fail_marker_positive(void) {}
|
||||
void fail_marker_negative(void) {}
|
||||
void fail_marker_detected(void) {}
|
||||
|
||||
void init_outputs(plain_t x_c, plain_t y_c, plain_t z_c);
|
||||
int wasm_module(void);
|
||||
enc_t get_cored_res(void);
|
||||
|
||||
MAIN() {
|
||||
int result;
|
||||
void os_main(void) {
|
||||
init_outputs(100, 142, 100);
|
||||
|
||||
MARKER(start_trace);
|
||||
result = wasm_module();
|
||||
MARKER(stop_trace);
|
||||
fail_start_trace();
|
||||
sign_t static_sig = wasm_module();
|
||||
fail_stop_trace();
|
||||
|
||||
if (result == 100) {
|
||||
MARKER(ok_marker);
|
||||
sign_t vote_result_sig;
|
||||
switch (static_sig) {
|
||||
case SIG_s_XYZ:
|
||||
case SIG_s_XY:
|
||||
case SIG_s_XZ:
|
||||
vote_result_sig = SIG_X;
|
||||
break;
|
||||
case SIG_s_YZ:
|
||||
vote_result_sig = SIG_Y;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Inversely apply constant program flow signature.
|
||||
enc_t cored_res = get_cored_res();
|
||||
cored_res -= static_sig;
|
||||
|
||||
/* Validate Vote result */
|
||||
if (!check(cored_res, THE_A, vote_result_sig)) {
|
||||
fail_marker_detected();
|
||||
return;
|
||||
}
|
||||
|
||||
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
||||
if (res == 100) {
|
||||
fail_marker_positive();
|
||||
return;
|
||||
} else {
|
||||
MARKER(fail_marker);
|
||||
fail_marker_negative();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define INLINE __attribute__((always_inline)) inline
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
|
||||
#define __QUOTE(x) #x
|
||||
#define QUOTE(x) __QUOTE(x)
|
||||
|
||||
#ifndef ARCH_ASM_CLOBBER_ALL
|
||||
#define ARCH_ASM_CLOBBER_ALL "eax", "ebx", "ecx", "edx", "esi", "edi", "ebp"
|
||||
#endif
|
||||
|
||||
#ifndef MARKER
|
||||
#define MARKER(str) \
|
||||
__asm__ volatile(QUOTE(str) ":" \
|
||||
: /* no inputs */ \
|
||||
: /* no outputs */ \
|
||||
: "memory", ARCH_ASM_CLOBBER_ALL)
|
||||
#endif
|
||||
|
||||
#ifndef MAIN
|
||||
#define MAIN() void os_main(void)
|
||||
#endif
|
||||
|
||||
#ifndef POSIX_PRINTF
|
||||
#define POSIX_PRINTF(...)
|
||||
#endif
|
||||
|
||||
typedef __UINT8_TYPE__ uint8_t;
|
||||
typedef __UINT16_TYPE__ uint16_t;
|
||||
typedef __UINT32_TYPE__ uint32_t;
|
||||
|
||||
typedef __INT8_TYPE__ int8_t;
|
||||
typedef __INT16_TYPE__ int16_t;
|
||||
typedef __INT32_TYPE__ int32_t;
|
||||
+45
-4
@@ -1,15 +1,56 @@
|
||||
#include "../lib_cored.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void init_outputs(plain_t x_c, plain_t y_c, plain_t z_c);
|
||||
int wasm_module(void);
|
||||
enc_t get_cored_res(void);
|
||||
|
||||
void fail_marker_detected(void) {}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int result = wasm_module();
|
||||
init_outputs(100, 142, 100);
|
||||
sign_t static_sig = wasm_module();
|
||||
|
||||
if (result == 100) {
|
||||
printf("OK Marker\n");
|
||||
sign_t vote_result_sig;
|
||||
switch (static_sig) {
|
||||
case SIG_s_XYZ:
|
||||
case SIG_s_XY:
|
||||
case SIG_s_XZ:
|
||||
vote_result_sig = SIG_X;
|
||||
break;
|
||||
case SIG_s_YZ:
|
||||
vote_result_sig = SIG_Y;
|
||||
break;
|
||||
default:
|
||||
// printf("ERROR: Unknown static_sig %d\n", static_sig);
|
||||
break;
|
||||
}
|
||||
|
||||
// Inversely apply constant program flow signature.
|
||||
enc_t cored_res = get_cored_res();
|
||||
printf("Inversely apply: cored_res=%d static_sig=%d\n", cored_res,
|
||||
static_sig);
|
||||
cored_res -= static_sig;
|
||||
|
||||
/* Validate Vote result */
|
||||
printf(
|
||||
"Validating vote result: cored_res=%d THE_A=%d vote_result_sig = % d\n ",
|
||||
cored_res, THE_A, vote_result_sig);
|
||||
if (!check(cored_res, THE_A, vote_result_sig)) {
|
||||
printf("Validation failed :(\n");
|
||||
// fail_marker_detected();
|
||||
return 1;
|
||||
}
|
||||
|
||||
plain_t res = decode(cored_res, THE_A, vote_result_sig);
|
||||
// printf("Decoded result: %d (%f)\n", res, q_to_float(res));
|
||||
if (res == 100) {
|
||||
// fail_marker_positive();
|
||||
printf("Marker Positive\n");
|
||||
return 0;
|
||||
} else {
|
||||
printf("FAIL Marker\n");
|
||||
printf("Marker Negative\n");
|
||||
// fail_marker_negative();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user