[英]jonesforth segmentation fault
System I'm on: 系统我在:
/tmp/jonesforth $ cat /etc/issue
Ubuntu 16.04.1 LTS \n \l
This is a 32-bit system. 这是一个32位系统。
Clone from the annexia repository: 从annexia存储库中克隆:
git clone git://git.annexia.org/git/jonesforth.git
The build goes OK: 构建顺利:
cd jonesforth
/tmp/jonesforth $ make
gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o jonesforth jonesforth.S
The tests however do not pass: 然而,测试没有通过:
/tmp/jonesforth $ make test
test_stack_trace.f ... --- .test_stack_trace.test 2016-09-17 17:44:59.488492834 -0500
+++ test_stack_trace.f.out 2016-09-17 17:33:11.171189490 -0500
@@ -0,0 +1,6 @@
+TEST4+0 TEST3+0 TEST2+0 TEST+0
+3
+TEST4+0 TEST3+32 TEST2+0 TEST+0
+TEST4+0 TEST3+0 TEST2+4 TEST+0
+3
+TEST4+0 TEST3+32 TEST2+4 TEST+0
Makefile:34: recipe for target 'test_stack_trace.test' failed
make: *** [test_stack_trace.test] Error 1
Starting up jonesforth leads to a segmentation fault: 启动jonesforth会导致分段错误:
/tmp/jonesforth $ cat jonesforth.f - | ./jonesforth
Segmentation fault
Removing -Wl,-Ttext,0
from the Makefile entry for jonesforth
: 删除-Wl,-Ttext,0
从Makefile文件条目jonesforth
:
jonesforth: jonesforth.S
gcc -m32 -nostdlib -static $(BUILD_ID_NONE) -o $@ $<
seems to help. 似乎有所帮助。 The build succeeds: 构建成功:
/tmp/jonesforth $ touch jonesforth.S
/tmp/jonesforth $ make
gcc -m32 -nostdlib -static -o jonesforth jonesforth.S
The tests pass: 测试通过:
/tmp/jonesforth $ make test
test_stack_trace.f ... ok
test_stack.f ... ok
test_comparison.f ... ok
test_assembler.f ... ok
test_exception.f ... ok
test_read_file.f ... ok
test_number.f ... ok
And it starts up: 它启动:
/tmp/jonesforth $ cat jonesforth.f - | ./jonesforth
JONESFORTH VERSION 47
14499 CELLS REMAINING
OK
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.