Skip to content
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

386: Segmentation fault #7

Open
tekknolagi opened this issue Jul 26, 2018 · 0 comments
Open

386: Segmentation fault #7

tekknolagi opened this issue Jul 26, 2018 · 0 comments

Comments

@tekknolagi
Copy link

tekknolagi commented Jul 26, 2018

I'm not entirely sure what the root of this is (investigating), but 386 seems to produce a segmentation fault when running a binary produced by @akkartik's subx. This is unexpected, because both subx and my machine (Ubuntu Linux, x86) can run this binary. It's a simple program: return 1.

I have attached the traceback and also the hexdump of the binary.

willow% ./386 ../mu/subx/ex1           
[2]    406 segmentation fault (core dumped)  ./386 ../mu/subx/ex1
willow% gdb -q ./386
Reading symbols from ./386...done.
(gdb) run ../mu/subx/ex1
Starting program: /home/max/Documents/Dev/stoneknifeforth/386 ../mu/subx/ex1

Program received signal SIGSEGV, Segmentation fault.
__memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:356
356	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
(gdb) where
#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:356
#1  0x0000555555555129 in load (elf_file=0x555555758260 "\177ELF\001\001\001", length=96, terp=0x7fffffffd5e0) at 386.c:145
#2  0x0000555555556297 in main (argc=2, argv=0x7fffffffd708) at 386.c:421
(gdb) 

the relevant binary

0000000 457f 464c 0101 0001 0000 0000 0000 0000
0000010 0002 0003 0001 0000 8054 0804 0034 0000
0000020 0000 0000 0000 0000 0034 0020 0001 0000
0000030 0000 0000 0001 0000 0054 0000 8054 0804
0000040 8054 0804 000c 0000 000c 0000 0005 0000
0000050 1000 0000 2abb 0000 b800 0001 0000 80cd
0000060

It seems as though ram + p_vaddr points to an invalid location in memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant