systems-nuts / unifico

Compiler and build harness for heterogeneous-ISA binaries with the same stack layout.
4 stars 1 forks source link

`ua` Segmentation fault #207

Closed blackgeorge-boom closed 2 years ago

blackgeorge-boom commented 2 years ago
./ua_aarch64_aligned.out        

[1]    428080 bus error (core dumped)  ./ua_aarch64_aligned.out
gdb ua_aarch64_aligned.out 

Type "apropos word" to search for commands related to "word"...
"0xffffffffec08s": not in executable format: file format not recognized
blackgeorge-boom commented 2 years ago
strace ./ua_aarch64_aligned.out                                                                                                                                                 <<<
execve("./ua_aarch64_aligned.out", ["./ua_aarch64_aligned.out"], 0xfffffffff080 /* 50 vars */) = 0
mremap(0xfffff7ffd000, 8192, 8192, MREMAP_MAYMOVE|MREMAP_FIXED, 0x7fffffffd000) = 0x7fffffffd000
mremap(0xfffff7fff000, 4096, 4096, MREMAP_MAYMOVE|MREMAP_FIXED, 0x7ffffffff000) = 0x7ffffffff000
mmap(0x7ffffeffd000, 16777216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffffeffd000
prctl(PR_SET_MM, PR_SET_MM_START_STACK, 0x7fffffffbfd0, 0, 0) = -1 EPERM (Operation not permitted)
prctl(PR_SET_MM, PR_SET_MM_ARG_START, 0x7fffffffc38a, 0, 0) = -1 EPERM (Operation not permitted)
prctl(PR_SET_MM, PR_SET_MM_ARG_END, 0x7fffffffc3a3, 0, 0) = -1 EPERM (Operation not permitted)
prctl(PR_SET_MM, PR_SET_MM_ENV_START, 0x7fffffffc3a3, 0, 0) = -1 EPERM (Operation not permitted)
prctl(PR_SET_MM, PR_SET_MM_ENV_END, 0x7fffffffd000, 0, 0) = -1 EPERM (Operation not permitted)
prctl(PR_SET_MM, PR_SET_MM_AUXV, 0x7fffffffc210, 0x140, 0) = -1 EPERM (Operation not permitted)
mmap(0x800000000000, 140737488355328, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x800000000000
munmap(0xfffffffde000, 139264)          = 0
--- SIGBUS {si_signo=SIGBUS, si_code=BUS_ADRERR, si_addr=0xd01008} ---
+++ killed by SIGBUS (core dumped) +++
blackgeorge-boom commented 2 years ago

It turns out I was mis-compiling this. It seems to work now.