summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/instruction/729
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/zero-shot/105/instruction/729')
-rw-r--r--results/classifier/zero-shot/105/instruction/72947
1 files changed, 47 insertions, 0 deletions
diff --git a/results/classifier/zero-shot/105/instruction/729 b/results/classifier/zero-shot/105/instruction/729
new file mode 100644
index 000000000..bc479388b
--- /dev/null
+++ b/results/classifier/zero-shot/105/instruction/729
@@ -0,0 +1,47 @@
+instruction: 0.833
+semantic: 0.823
+graphic: 0.783
+vnc: 0.625
+device: 0.600
+mistranslation: 0.561
+other: 0.519
+assembly: 0.417
+socket: 0.387
+network: 0.379
+boot: 0.290
+KVM: 0.260
+
+Environment variables are not passed with user-space semihosting
+Description of problem:
+Environment variables are not passed to the emulated process, either inherited (as I might expect it to work in user-space?) or by specifying the values through the QEMU command-line. Note that setting the environment variable from within the app before calling `getenv` does work, so it isn't just a case of some system no-ops for the platform.
+Steps to reproduce:
+1. Compile the following program with [ARM embedded toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads):
+```cpp
+#include <iostream>
+#include <cstdlib>
+
+int main(int argc, char* argv[]) {
+	char* env = std::getenv("TEST");
+	if (env)
+		std::cout << "Env TEST: " << env << "\n";
+	else
+		std::cout << "Env TEST not set.\n";
+	return 0;
+}
+```
+
+```
+$ $CXX --version
+arm-none-eabi-g++ (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
+Copyright (C) 2020 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+$ $CXX main.cpp --specs=rdimon.specs -mcpu=cortex-m7
+```
+
+2. Run in user-space (semihosted):
+```
+$ qemu-arm -cpu cortex-m7 -E TEST=val123 ./a.out 
+Env TEST not set.
+```