New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test failed on SPARC #60
Comments
The runtime error from UBSan can probably be ignored - we rely on Janet uses the nanboxing technique internally, and relies on NaNs generated by floating point operations to be of a certain form that is different than the artificially created ones that are actually tagged pointers (quiet NaNs vs. signaling, but's it's really more about the specific bits in the signalling NaNs) . There are a bunch of fiddly macros in janet.h for dealing with this. If I had to guess, the table has length 2, so if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return; Some things to try:
Sample diff: diff --git a/Makefile b/Makefile
index e04662a..5b75117 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ MANPATH?=$(PREFIX)/share/man/man1/
DEBUGGER=gdb
CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
+ -DJANET_NO_NANBOX -fsanitize=undefined \
-DJANET_BUILD=$(JANET_BUILD)
LDFLAGS=-rdynamic
diff --git a/src/boot/system_test.c b/src/boot/system_test.c
index cf991f9..1b03a7d 100644
--- a/src/boot/system_test.c
+++ b/src/boot/system_test.c
@@ -48,5 +48,7 @@ int system_test() {
assert(janet_equals(janet_cstringv("a string."), janet_cstringv("a string.")));
assert(janet_equals(janet_csymbolv("sym"), janet_csymbolv("sym")));
+ assert(JANET_NUMBER == janet_type(janet_wrap_number(0.0 / 0.0)));
+
return 0;
} |
-DJANET_NO_NANBOX helped. |
solaris, sparc
linux, x64
i want both sparc and linux return true on this test from suite0.janet
The text was updated successfully, but these errors were encountered: