OpenSSL worked fine on NetBSD 8, but in NetBSD 9 it immediately
segfaults. Does anyone know what's going on here?
This is netbsd-9 with Kalvis' patches, available here:
https://www.zia.io/~john/vax/
20145 1 ktrace EMUL "netbsd"
20145 1 ktrace CALL execve(0x7ffffe67,0x7ffff990,0x7ffff99c)
20145 1 ktrace NAMI "/usr/bin/openssl"
20145 1 ktrace NAMI "/usr/libexec/ld.elf_so"
20145 1 openssl EMUL "netbsd"
20145 1 openssl RET execve JUSTRETURN
20145 1 openssl CALL
mmap(0,0x8000,PROT_READ|PROT_WRITE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137878528/0x7f6d7000
20145 1 openssl CALL open(0x7f6eb533,0,0)
20145 1 openssl NAMI "/etc/ld.so.conf"
20145 1 openssl RET open -1 errno 2 No such file or directory
20145 1 openssl CALL open(0x7ffff210,0,0)
20145 1 openssl NAMI "/usr/lib/libssl.so.14"
20145 1 openssl RET open 3
20145 1 openssl CALL __fstat50(3,0x7ffff154)
20145 1 openssl RET __fstat50 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ,0x1<SHARED,FILE,ALIGN=NONE>,3,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x82000,PROT_READ|PROT_EXEC,0x10000002<PRIVATE,FILE,ALIGN=64KB>,3,0,0,0)
20145 1 openssl RET mmap 2137325568/0x7f650000
20145 1 openssl CALL
mmap(0x7f6c9000,0x9000,PROT_READ|PROT_WRITE,0x12<PRIVATE,FIXED,FILE,ALIGN=NONE>,3,0,0x69000,0)
20145 1 openssl RET mmap 2137821184/0x7f6c9000
20145 1 openssl CALL
mmap(0x7f6d2000,0,PROT_READ|PROT_WRITE,0x1012<PRIVATE,FIXED,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137858048/0x7f6d2000
20145 1 openssl CALL mprotect(0x7f6ba000,0xf000,PROT_NONE)
20145 1 openssl RET mprotect 0
20145 1 openssl CALL close(3)
20145 1 openssl RET close 0
20145 1 openssl CALL open(0x7ffff210,0,0x900)
20145 1 openssl NAMI "/usr/lib/libcrypto.so.14"
20145 1 openssl RET open 3
20145 1 openssl CALL __fstat50(3,0x7ffff154)
20145 1 openssl RET __fstat50 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ,0x1<SHARED,FILE,ALIGN=NONE>,3,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x217000,PROT_READ|PROT_EXEC,0x10000002<PRIVATE,FILE,ALIGN=64KB>,3,0,0,0)
20145 1 openssl RET mmap 2135097344/0x7f430000
20145 1 openssl CALL
mmap(0x7f62a000,0x1a000,PROT_READ|PROT_WRITE,0x12<PRIVATE,FIXED,FILE,ALIGN=NONE>,3,0,0x1ea000,0)
20145 1 openssl RET mmap 2137169920/0x7f62a000
20145 1 openssl CALL
mmap(0x7f644000,0x3000,PROT_READ|PROT_WRITE,0x1012<PRIVATE,FIXED,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137276416/0x7f644000
20145 1 openssl CALL mprotect(0x7f61b000,0xf000,PROT_NONE)
20145 1 openssl RET mprotect 0
20145 1 openssl CALL close(3)
20145 1 openssl RET close 0
20145 1 openssl CALL open(0x7ffff210,0,0x900)
20145 1 openssl NAMI "/usr/lib/libcrypt.so.1"
20145 1 openssl RET open 3
20145 1 openssl CALL __fstat50(3,0x7ffff154)
20145 1 openssl RET __fstat50 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ,0x1<SHARED,FILE,ALIGN=NONE>,3,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x19000,PROT_READ|PROT_EXEC,0x10000002<PRIVATE,FILE,ALIGN=64KB>,3,0,0,0)
20145 1 openssl RET mmap 2134966272/0x7f410000
20145 1 openssl CALL
mmap(0x7f424000,0x1000,PROT_READ|PROT_WRITE,0x12<PRIVATE,FIXED,FILE,ALIGN=NONE>,3,0,0x4000,0)
20145 1 openssl RET mmap 2135048192/0x7f424000
20145 1 openssl CALL
mmap(0x7f425000,0x4000,PROT_READ|PROT_WRITE,0x1012<PRIVATE,FIXED,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2135052288/0x7f425000
20145 1 openssl CALL mprotect(0x7f415000,0xf000,PROT_NONE)
20145 1 openssl RET mprotect 0
20145 1 openssl CALL close(3)
20145 1 openssl RET close 0
20145 1 openssl CALL open(0x7ffff210,0,0x900)
20145 1 openssl NAMI "/usr/lib/libc.so.12"
20145 1 openssl RET open 3
20145 1 openssl CALL __fstat50(3,0x7ffff154)
20145 1 openssl RET __fstat50 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ,0x1<SHARED,FILE,ALIGN=NONE>,3,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x1cc000,PROT_READ|PROT_EXEC,0x10000002<PRIVATE,FILE,ALIGN=64KB>,3,0,0,0)
20145 1 openssl RET mmap 2133065728/0x7f240000
20145 1 openssl CALL
mmap(0x7f3e7000,0xa000,PROT_READ|PROT_WRITE,0x12<PRIVATE,FIXED,FILE,ALIGN=NONE>,3,0,0x197000,0)
20145 1 openssl RET mmap 2134798336/0x7f3e7000
20145 1 openssl CALL
mmap(0x7f3f1000,0x1b000,PROT_READ|PROT_WRITE,0x1012<PRIVATE,FIXED,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2134839296/0x7f3f1000
20145 1 openssl CALL mprotect(0x7f3d8000,0xf000,PROT_NONE)
20145 1 openssl RET mprotect 0
20145 1 openssl CALL close(3)
20145 1 openssl RET close 0
20145 1 openssl CALL open(0x7ffff210,0,0x900)
20145 1 openssl NAMI "/lib/libgcc_s.so.1"
20145 1 openssl RET open 3
20145 1 openssl CALL __fstat50(3,0x7ffff154)
20145 1 openssl RET __fstat50 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ,0x1<SHARED,FILE,ALIGN=NONE>,3,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x1a000,PROT_READ|PROT_EXEC,0x10000002<PRIVATE,FILE,ALIGN=64KB>,3,0,0,0)
20145 1 openssl RET mmap 2132934656/0x7f220000
20145 1 openssl CALL
mmap(0x7f239000,0x1000,PROT_READ|PROT_WRITE,0x12<PRIVATE,FIXED,FILE,ALIGN=NONE>,3,0,0x9000,0)
20145 1 openssl RET mmap 2133037056/0x7f239000
20145 1 openssl CALL
mmap(0x7f23a000,0,PROT_READ|PROT_WRITE,0x1012<PRIVATE,FIXED,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2133041152/0x7f23a000
20145 1 openssl CALL mprotect(0x7f22a000,0xf000,PROT_NONE)
20145 1 openssl RET mprotect 0
20145 1 openssl CALL close(3)
20145 1 openssl RET close 0
20145 1 openssl CALL _lwp_setprivate(0x7f6dc100)
20145 1 openssl RET _lwp_setprivate 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff8d4,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL readlink(0x7f3a266d,0x7ffff3db,0x400)
20145 1 openssl NAMI "/etc/malloc.conf"
20145 1 openssl RET readlink -1 errno 2 No such file or
directory
20145 1 openssl CALL issetugid
20145 1 openssl RET issetugid 0
20145 1 openssl CALL
__sysctl(0x7ffff760,2,0x7f400800,0x7ffff75c,0,0)
20145 1 openssl RET __sysctl 0
20145 1 openssl CALL
mmap(0,0x1000,PROT_NONE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL madvise(0x7f6d6000,0x1000,6)
20145 1 openssl RET madvise 0
20145 1 openssl CALL munmap(0x7f6d6000,0x1000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x200000,PROT_READ|PROT_WRITE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2130837504/0x7f020000
20145 1 openssl CALL munmap(0x7f020000,0x200000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL
mmap(0,0x3ff000,PROT_READ|PROT_WRITE,0x15001002<PRIVATE,ANONYMOUS,ALIGN=2MB>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2128609280/0x7ee00000
20145 1 openssl CALL munmap(0x7f000000,0x1ff000)
20145 1 openssl RET munmap 0
20145 1 openssl CALL break(0xac4c4)
20145 1 openssl RET break 0
20145 1 openssl CALL __clock_gettime50(3,0x7ffff6a8)
20145 1 openssl RET __clock_gettime50 0
20145 1 openssl CALL __clock_gettime50(3,0x7ffff6a8)
20145 1 openssl RET __clock_gettime50 0
20145 1 openssl CALL __clock_gettime50(3,0x7ffff708)
20145 1 openssl RET __clock_gettime50 0
20145 1 openssl CALL
mmap(0,0x7000,PROT_READ|PROT_WRITE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137296896/0x7f649000
20145 1 openssl CALL
mmap(0,0x1000,PROT_READ|PROT_WRITE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2137874432/0x7f6d6000
20145 1 openssl CALL
__sysctl(0x7fffee3c,2,0x7fffee28,0x7fffee20,0,0)
20145 1 openssl RET __sysctl 0
20145 1 openssl CALL
mmap(0,0x5000,PROT_READ|PROT_WRITE,0x1002<PRIVATE,ANONYMOUS,ALIGN=NONE>,0xffffffff,0,0,0)
20145 1 openssl RET mmap 2135076864/0x7f42b000
20145 1 openssl CALL
__sysctl(0x7f3a6d0c,2,0x7f4003a8,0x7ffff834,0,0)
20145 1 openssl RET __sysctl 0
20145 1 openssl CALL
__sysctl(0x7ffff830,2,0x7ffff828,0x7ffff82c,0,0)
20145 1 openssl RET __sysctl 0
20145 1 openssl CALL rasctl(0x7f34dcd5,0xd,0)
20145 1 openssl RET rasctl 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff870,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff870,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff870,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff870,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL _lwp_self
20145 1 openssl RET _lwp_self 1
20145 1 openssl CALL __sigprocmask14(1,0x7ffff870,0x7ffff93c)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl CALL __sigprocmask14(3,0x7ffff93c,0)
20145 1 openssl RET __sigprocmask14 0
20145 1 openssl PSIG SIGSEGV SIG_DFL: code=SEGV_MAPERR,
addr=0x7ff7fff8, trap=204)
20145 1 openssl NAMI "openssl.core"