-
Notifications
You must be signed in to change notification settings - Fork 784
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
build error by segmentation fault #52
Comments
Can you still reproduce the error? |
Now I'm compiling from newest source on ARMedslack-13.1 on SL-C860 :) |
Almost same error :( gcc -Wall -Werror-implicit-function-declaration -g -O3 -MMD -I. -I./../include -c vm.c -o vm.o |
I've notice the line "cat ./.rb > mrblib.rbtmp". It should be "cat ./*.rb > mrblib.rbtmp" Besides that, the biggest problem is SEGV from mrbc. Is there any way to get backtrace? |
Sorry, It exactly performed "cat ./.rb > mrblib.rbtmp". I'm not sure, but Github system might delete "" from my cut&paste to avoid something cracking? BTW, What do you mean "backtrace"? I can do "gdb" or "strace". Which one do you need? or Do you need to perform another tool? Thanx! |
Now I understood that I should post like "cat ./*.rb ..." :P |
You can do "gdb"! That's good news. $ cd mrblib I want to see the output from "where" command. |
10132 m-ito@c860: Program received signal SIGSEGV, Segmentation fault.
Quit anyway? (y or n) y |
Thank you. One more request. (gdb) p c please? |
9999 m-ito@c860:~/tmp/mruby-mruby-bf747ef/mrblib$ gdb ../bin/mrbc Program received signal SIGSEGV, Segmentation fault. Should I use "-O0" for building mruby? or |
I think -O0 will make it printable. Could try again? |
This comment is just a reference. I'm trying ARM bare metal target (not the target of this issue) and have some issues about parser.y
I think c should be positive value always. |
(gdb) run -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp Program received signal SIGSEGV, Segmentation fault. |
I put "#define ALLOC_ALIGN 4" in src/pool.c and do "make && make test" and I succeed to build mruby! 10023 m-ito@c860:~/tmp/mruby-mruby-bf747ef$ LC_ALL=C make test This is a very early version, please test and report errors. ........................................................................................ Thanx so much matz & monaka :D |
$ cat /etc/slackware-version
Slackware 13.37.0
$ uname -a
Linux c760 3.1.10 #1 PREEMPT Thu Feb 16 01:18:19 JST 2012 armv5tel XScale-PXA255 rev 6 (v5l) SHARP Husky GNU/Linux
$ tar xvzf mruby-mruby-e26bf08.tar.gz
$ cd mruby-mruby-e26bf08
$ make
snip
gcc -o ../../bin/mrbc ../../src/../tools/mrbc/mrbc.o ../../src/transcode.o ../../src/state.o ../../src/string.o ../../src/ascii.o ../../src/unicode.o ../../src/cdump.o ../../src/
crc.o ../../src/struct.o ../../src/codegen.o ../../src/sprintf.o ../../src/init.o ../../src/kernel.o ../../src/us_ascii.o ../../src/gc.o ../../src/vm.o ../../src/regparse.o ../..
/src/class.o ../../src/etc.o ../../src/dump.o ../../src/re.o ../../src/regcomp.o ../../src/version.o ../../src/encoding.o ../../src/error.o ../../src/hash.o ../../src/regenc.o ..
/../src/object.o ../../src/utf_8.o ../../src/compar.o ../../src/proc.o ../../src/regexec.o ../../src/variable.o ../../src/range.o ../../src/pool.o ../../src/enum.o ../../src/nume
ric.o ../../src/array.o ../../src/regerror.o ../../src/print.o ../../src/symbol.o ../../src/st.o ../../src/y.tab.o -lm
make: built targets of /home/m-ito/tmp/mruby-mruby-e26bf08/tools/mrbc
cat struct.rb error.rb string.rb hash.rb compar.rb range.rb enum.rb numeric.rb kernel.rb array.rb print.rb > mrblib.rbtmp
../bin/mrbc -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp; cat init_mrblib.c mrblib.ctmp > mrblib.c
/bin/sh: line 1: 14047 Segmentation fault ../bin/mrbc -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp
snip
make: built targets of /home/m-ito/tmp/mruby-mruby-e26bf08/mrblib
gcc -o ../../bin/mruby ../../src/../tools/mruby/mruby.o ../../src/transcode.o ../../src/unicode.o ../../src/crc.o ../../src/struct.o ../../src/us_ascii.o ../../src/proc.o ../../s
rc/pool.o ../../src/regenc.o ../../src/load.o ../../src/ascii.o ../../src/version.o ../../src/hash.o ../../src/utf_8.o ../../src/codegen.o ../../src/range.o ../../src/enum.o ../.
./src/regerror.o ../../src/symbol.o ../../src/object.o ../../src/state.o ../../src/vm.o ../../src/print.o ../../src/sprintf.o ../../src/init.o ../../src/numeric.o ../../src/error
.o ../../src/regparse.o ../../src/init_ext.o ../../src/class.o ../../src/etc.o ../../src/string.o ../../src/regcomp.o ../../src/kernel.o ../../src/encoding.o ../../src/compar.o .
./../src/regexec.o ../../src/variable.o ../../src/re.o ../../src/array.o ../../src/gc.o ../../src/st.o ../../src/y.tab.o ../../src/../mrblib/mrblib.o -lm
../../src/../mrblib/mrblib.o: In function
mrb_init_mrblib': /home/m-ito/tmp/mruby-mruby-e26bf08/mrblib/mrblib.c:16: undefined reference to
mrblib_irep'collect2: ld returned 1 exit status
make[1]: *** [../../bin/mruby] Error 1
make: *** [src/init_ext.o] Error 2
$ cd mrblib/
$ ../bin/mrbc -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp
Segmentation fault
$ gdb ../bin/mrbc
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-slackware-linux-gnueabi".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/m-ito/tmp/mruby-mruby-e26bf08/bin/mrbc...done.
(gdb) run -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp
Starting program: /home/m-ito/tmp/mruby-mruby-e26bf08/bin/mrbc -Bmrblib_irep -omrblib.ctmp mrblib.rbtmp
Program received signal SIGSEGV, Segmentation fault.
0x000ab7ec in parser_yylex (p=0x11c8f0) at ../../src/parse.y:4451
4451 if (!identchar(c)) {
(gdb) list
4446 case '_':
4447 token_column = newtok(p);
4448 break;
4449
4450 default:
4451 if (!identchar(c)) {
4452 yyerror_i(p, "Invalid char `\x%02X' in expression", c);
4453 goto retry;
4454 }
4455
(gdb) p c
$1 = 2686976
(gdb) quit
A debugging session is active.
Quit anyway? (y or n) y
What can I do ?
The text was updated successfully, but these errors were encountered: