owl-lisp/owl

Test error on Mac OS X

rncar opened this issue · 2 comments

Mac OS X Yosemite (10.10.3)

clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

make

# make a vm without a bundled heap
echo "unsigned char *heap = 0;" > c/vm.c
cat c/ovm.c >> c/vm.c
cc -Wall -O2 -o bin/vm c/vm.c
# start bootstrapping with the bundled init.fasl image
cp fasl/init.fasl fasl/boot.fasl
# selfcompile boot.fasl until a fixed point is reached
bin/vm fasl/boot.fasl --run owl/ol.scm -s none -o fasl/bootp.fasl
;; Defined *interactive*
> ;; Defined *include-dirs*
> ;; Defined *owl-names*
> ;; Library (owl syscall) added
> ;; Imported (owl syscall)
> ;; Imported (owl primop)
> ;; Defined *loaded*
> ;; Defined *owl-version*
> ;; Defined exit-seccomp-failed
> ;; Defined max-object-size
> ;; Defined owl-ohai
> ;; Defined owl-ohai-seccomp
> ;; Library (owl boolean) added
> ;; Imported (owl boolean)
> ;; Library (owl list) added
> ;; Imported (owl list)
> ;; Library (owl ff) added
> ;; Imported (owl ff)
> ;; Library (owl iff) added
> ;; Imported (only (owl iff))
> ;; Library (owl math) added
> ;; Imported (owl math)
> ;; Library (owl list-extra) added
> ;; Imported (owl list-extra)
> ;; Library (owl sort) added
> ;; Imported (owl sort)
> ;; Library (owl math-extra) added
> ;; Imported (owl math-extra)
> ;; Library (owl lazy) added
> ;; Imported (owl lazy)
> ;; Library (owl unicode) added
> ;; Imported (only (owl unicode) encode-point)
> ;; Library (owl string) added
> ;; Imported (owl string)
> ;; Defined fopen
> ;; Library (owl vector) added
> ;; Imported (owl vector)
> ;; Library (owl symbol) added
> ;; Imported (owl symbol)
> ;; Library (owl tuple) added
> ;; Imported (owl tuple)
> ;; Library (owl function) added
> ;; Imported (owl function)
> ;; Library (owl equal) added
> ;; Imported (owl equal)
> ;; Library (owl rlist) added
> ;; Imported (owl rlist)
> ;; Library (owl eof) added
> ;; Library (owl render) added
> ;; Imported (owl render)
> ;; Library (owl queue) added
> ;; Imported (only (owl queue))
> ;; Library (owl intern) added
> ;; Imported (owl intern)
> ;; Imported (owl eof)
> ;; Imported (owl io)
> ;; Library (owl parse) added
> ;; Imported (owl parse)
> ;; Library (owl regex) added
> ;; Imported (owl regex)
> ;; Library (owl sexp) added
> ;; Imported (owl sexp)
> ;; Defined ok?
> ;; Defined ok
> ;; Defined fail
> ;; Library (scheme cxr) added
> ;; Imported (scheme cxr)
> ;; Library (scheme base) added
> ;; Imported (scheme base)
> ;; Library (scheme case-lambda) added
> ;; Imported (scheme case-lambda)
> ;; Library (owl env) added
> ;; Imported (owl env)
> ;; Library (owl gensym) added
> ;; Imported (owl gensym)
> ;; Library (owl bisect) added
> ;; Imported (owl bisect)
> ;; Defined verbose-vm-error
> ;; Defined prim-opcodes
> ;; Defined opcode->wrapper
> ;; Defined primop-of
> ;; Defined primitive?
> ;; Library (owl macro) added
> ;; Imported (owl macro)
> ;; Library (owl ast) added
> ;; Imported (owl ast)
> ;; Library (owl fixedpoint) added
> ;; Imported (owl fixedpoint)
> ;; Library (owl cps) added
> ;; Imported (owl cps)
> ;; Library (owl alpha) added
> ;; Imported (owl alpha)
> ;; Defined small-value?
> ;; Library (owl thread) added
> ;; Imported (owl thread)
> ;; Library (owl assemble) added
> ;; Imported (owl assemble)
> ;; Library (owl closure) added
> ;; Imported (owl closure)
> ;; Library (owl compile) added
> ;; Imported (owl compile)
> ;; Library (owl suffix) added
> ;; Imported (owl suffix)
> ;; Defined error-tag
> ;; Defined error?
> ;; Library (owl time) added
> ;; Imported (owl time)
> ;; Defined sleep
> ;; Defined input-chunk-size
> ;; Defined output-chunk-size
> ;; Defined file-in
> ;; Defined file-out
> ;; Defined read-file
> 'share-bindings
> ;; Defined share-modules
> ;; Library (owl random) added
> ;; Imported (owl random)
> ;; Defined blocksize
> #<function>
> ;; Imported (owl random)
> ;; Library (owl args) added
> ;; Imported (owl args)
> ;; Library (owl cgen) added
> ;; Imported (owl cgen)
> ;; Library (owl dump) added
> ;; Imported (only (owl dump) make-compiler dump-fasl load-fasl)
> ;; Defined compiler
> ;; Defined suspend
> ;; Library (owl checksum) added
> ;; Imported (owl checksum)
> ;; Library (owl sys) added
> ;; Imported (owl sys)
> ;; Defined ensure-free-heap-space
> ;; Defined seccomp
> ;; Library (owl char) added
> ;; Defined profile
> ;; Defined *features*
> ;; Library (owl eval) added
> ;; Imported (owl eval)
> ;; Library (owl base) added
> ;; Imported (owl base)
> ;; Defined *libraries*
> ;; Defined shared-misc
> ;; Defined shared-bindings
> ;; Defined initial-environment-sans-macros
> ;; Defined initial-environment
> ;; Defined command-line-rules
> ;; Defined brief-usage-text
> ;; Defined error-usage-text
> ;; Defined strip-zeros
> ;; Defined memory-limit-ok?
> ;; Defined maybe-set-memory-limit
> ;; Defined c-source-name
> ;; Defined try
> ;; Defined owl-run
> ;; Defined about-owl
> ;; Library (owl usuals) added
> ;; Imported (owl usuals)
> ;; Defined repl-compile
> ;; Defined try-load-state
> ;; Defined try-repl-string
> ;; Defined try-test-string
> ;; Defined greeting
> ;; Defined repl-start
> ;; Defined directory-of
> ;; Defined heap-entry
> ;; Defined command-line-rules
> ;; Defined choose-natives
> Code loaded at 21943ms.
#true
> #<function>
> Output written at 36264ms.
ls -la fasl/bootp.fasl
-rw-------  1 vito  staff  561212 Jun 21 17:45 fasl/bootp.fasl
# check that the new image passes tests
CC=cc tests/run all bin/vm fasl/bootp.fasl
-n Running tests/ against bin/vm fasl/bootp.fasl:
 o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o oERROR: tests/no-threads.sh
ERROR: tests/cout.sh
2a3,6
> tmp/bare-13415.c:1617:8: warning: comparison of array 'heap' equal to a null pointer is always false [-Wtautological-pointer-compare]
>    if (heap == NULL) { /* if no preloaded heap, try to load it from first arg */
>        ^~~~    ~~~~
> 1 warning generated.
ERROR: tests/no-threads.sh
0a1,8
> tmp/foo-C1-13274.c:2551:8: warning: comparison of array 'heap' equal to a null pointer is always false [-Wtautological-pointer-compare]
>    if (heap == NULL) { /* if no preloaded heap, try to load it from first arg */
>        ^~~~    ~~~~
> 1 warning generated.
> tmp/foo-C1-13274.c:2551:8: warning: comparison of array 'heap' equal to a null pointer is always false [-Wtautological-pointer-compare]
>    if (heap == NULL) { /* if no preloaded heap, try to load it from first arg */
>        ^~~~    ~~~~
> 1 warning generated.
ERROR: tests/cout.sh
make: *** [fasl/ol.fasl] Error 1
aoh commented

Thanks! This seems to happen also here using current clang shipped with Ubuntu. Odd how it doesn't complain about heap being null tautologically in the vm built before the test, but does dislike it being non-null tautologically later. Will fix after work.

aoh commented

That was a long work. Works now at least on my clang in Linux.