The default system shell in snv_133 segvs on code that runs correctly on
other (earlier) versions of ksh93.
% cat /tmp/A
#/bin/ksh
typeset +A spaces
spaces[0]=''
% echo ${.sh.version}
Version JMP 93t+ 2009-10-12
% /tmp/A
Memory fault(coredump)
% /usr/local/bin/ksh
% echo ${.sh.version} # works - built from AST code
Version M 1993-12-28 s+
% /tmp/A
% uname -a
SunOS ratbert2 5.11 snv_133 i86pc i386 i86pc
% cat /etc/release
OpenSolaris Development snv_133 X86
Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 15 February 2010
% ls -l /usr/bin/{,amd64}/ksh93
-r-xr-xr-x 91 root bin 8244 Jan 22 01:02 /usr/bin//ksh93
-r-xr-xr-x 7 root bin 9848 Jan 22 01:02 /usr/bin/amd64/ksh93
% digest -a md5 /usr/bin/{,amd64}/ksh93
(/usr/bin//ksh93) = 596bad33627c454e2fbad70df4c29be3
(/usr/bin/amd64/ksh93) = 9e9f9e20a9f80a1fee097a34d0b6e5da
# dbx /usr/bin/amd64/ksh93 /var/corefiles/core.0.ksh93.16720
Reading ksh93
core file header read successfully
Reading ld.so.1
Reading libc.so.1
Reading libshell.so.1
Reading libcmd.so.1
Reading libast.so.1
Reading libm.so.2
program terminated by signal SEGV (no mapping at the fault address)
0xfffffd7fff12878b: nv_associative+0x0043: movq
$0x0000000000000000,0x0000000000000060(%r13)
(dbx) where
=>[1] nv_associative(0x417d90, 0x417d90, 0x0, 0x0, 0xfffffd7fff128782, 0x0), at 0xfffffd7fff12878b
[2] array_clone(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1269cf
[3] clone_all_disc(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1538ec
[4] nv_clone(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff153cf6
[5] array_copytree(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff127045
[6] array_grow(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff127396
[7] nv_putsub(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x418357, 0x0, 0x0, 0x417d90, 0x0, 0x418359, 0x8, 0x5b, 0x417d90, 0x20200, 0xfffffd7fffdfea30, 0xfffffd7fff14c1c8, 0x1, 0x418350), at 0xfffffd7fff127fd7
[8] nv_endsubscript(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1284cd
[9] nv_create(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff14c1c8
[10] nv_open(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff14ce2c
[11] nv_setlist(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff14a652
[12] sh_exec(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff171c24
[13] exfile(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1494c6
[14] sh_main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff148caa
[15] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x400e72
env -i /bin/truss -eflda -rall -wall -u a.out:: -u /usr/bin/amd64/ksh93:: /tmp/A
Base time stamp: 1270405572.9372 [ Sun Apr 4 11:26:12 PDT 2010 ]
16826/1: 0.0000 execve("/usr/bin/i86/ksh93", 0x08047F60, 0x08047F6C)
argc = 2
16826/1: argv: sh /tmp/A
16826/1: envp:
16826/1: 0.0076 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFB0000
16826/1: 0.0078 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFA0000
16826/1: 0.0078 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF90000
16826/1: 0.0083 memcntl(0xFEFBC000, 29892, MC_ADVISE, MADV_WILLNEED, 0,
0) = 0
16826/1: 0.0084 memcntl(0x08050000, 2536, MC_ADVISE, MADV_WILLNEED, 0,
0) = 0
16826/1: 0.0085 resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) =
12
16826/1: 0.0086 resolvepath("/usr/bin/i86/ksh93", "/usr/bin/i86/ksh93",
1023) = 18
16826/1: 0.0086 sysconfig(_CONFIG_PAGESIZE) = 4096
16826/1: 0.0087 stat64("/usr/bin/i86/ksh93", 0x08047BE4) = 0
16826/1: 0.0088 open("/var/ld/ld.config", O_RDONLY) Err#2
ENOENT
16826/1: 0.0090 stat64("/lib/libc.so.1", 0x080473E4) = 0
16826/1: 0.0090 resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) =
14
16826/1: 0.0091 open("/lib/libc.so.1", O_RDONLY) = 3
16826/1: 0.0092 mmapobj(3, MMOBJ_INTERPRET, 0xFEF90890, 0x08047450,
0x00000000) = 0
16826/1: 0.0093 close(3) = 0
16826/1: 0.0094 memcntl(0xFEE30000, 189708, MC_ADVISE, MADV_WILLNEED,
0, 0) = 0
16826/1: 0.0098 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEE20000
16826/1: 0.0251 mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE10000
16826/1: 0.0253 getcontext(0x08047A34)
16826/1: 0.0254 getrlimit(RLIMIT_STACK, 0x08047A2C) = 0
16826/1: 0.0255 getpid() = 16826
[16825]
16826/1: 0.0255 lwp_private(0, 1, 0xFEE12A00) =
0x000001C3
16826/1: 0.0256 setustack(0xFEE12A60)
16826/1: 0.0265 sysi86(SI86FPSTART, 0xFEF89FCC, 0x0000133F, 0x00001F80)
= 0x00000001
16826/1...@1: 0.0266 -> __fsr()
16826/1...@1: 0.0272 <- __fsr() = 0xfef89f8c
16826/1...@1: 0.0273 -> _init()
16826/1...@1: 0.0279 <- _init() = 0xfef89f8c
16826/1...@1: 0.0281 -> main(0x2, 0x8047f60, 0x8047f6c, 0x8047f1c)
16826/1: 0.0287 memcntl(0x00000000, 0, MC_HAT_ADVISE, 0x8047F10, 0, 0)
Err#22 EINVAL
16826/1: 0.0287 stat64("/lib/libshell.so.1", 0x080474D8) Err#2
ENOENT
16826/1: 0.0288 stat64("/usr/lib/libshell.so.1", 0x080474D8) = 0
16826/1: 0.0289 resolvepath("/usr/lib/libshell.so.1",
"/usr/lib/libshell.so.1", 1023) = 22
16826/1: 0.0290 open("/usr/lib/libshell.so.1", O_RDONLY) = 3
16826/1: 0.0291 mmapobj(3, MMOBJ_INTERPRET, 0xFEE202D0, 0x08047544,
0x00000000) = 0
16826/1: 0.0291 close(3) = 0
16826/1: 0.0292 memcntl(0xFED60000, 58216, MC_ADVISE, MADV_WILLNEED, 0,
0) = 0
16826/1: 0.0294 stat64("/lib/libcmd.so.1", 0x08047148) Err#2
ENOENT
16826/1: 0.0295 stat64("/usr/lib/libcmd.so.1", 0x08047148) = 0
16826/1: 0.0295 resolvepath("/usr/lib/libcmd.so.1",
"/usr/lib/libcmd.so.1", 1023) = 20
16826/1: 0.0296 open("/usr/lib/libcmd.so.1", O_RDONLY) = 3
16826/1: 0.0297 mmapobj(3, MMOBJ_INTERPRET, 0xFEE208A0, 0x080471B4,
0x00000000) = 0
16826/1: 0.0298 close(3) = 0
16826/1: 0.0299 memcntl(0xFED10000, 20084, MC_ADVISE, MADV_WILLNEED, 0,
0) = 0
16826/1: 0.0299 stat64("/lib/libast.so.1", 0x08046DB8) Err#2
ENOENT
16826/1: 0.0300 stat64("/usr/lib/libast.so.1", 0x08046DB8) = 0
16826/1: 0.0301 resolvepath("/usr/lib/libast.so.1",
"/usr/lib/libast.so.1", 1023) = 20
16826/1: 0.0302 open("/usr/lib/libast.so.1", O_RDONLY) = 3
16826/1: 0.0303 mmapobj(3, MMOBJ_INTERPRET, 0xFEE20E78, 0x08046E24,
0x00000000) = 0
16826/1: 0.0304 close(3) = 0
16826/1: 0.0304 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEBF0000
16826/1: 0.0305 memcntl(0xFEC00000, 131348, MC_ADVISE, MADV_WILLNEED,
0, 0) = 0
16826/1: 0.0310 stat64("/lib/libm.so.2", 0x08047148) = 0
16826/1: 0.0310 resolvepath("/lib/libm.so.2", "/lib/libm.so.2", 1023) =
14
16826/1: 0.0311 open("/lib/libm.so.2", O_RDONLY) = 3
16826/1: 0.0312 mmapobj(3, MMOBJ_INTERPRET, 0xFEBF0568, 0x080471B4,
0x00000000) = 0
16826/1: 0.0313 close(3) = 0
16826/1: 0.0313 memcntl(0xFEB80000, 39464, MC_ADVISE, MADV_WILLNEED, 0,
0) = 0
16826/1: 0.0333 sysconfig(_CONFIG_PAGESIZE) = 4096
16826/1: 0.0334 brk(0x080611F0) = 0
16826/1: 0.0334 brk(0x080691F0) = 0
16826/1: 0.0335 schedctl() =
0xFEB7B000
16826/1: 0.0336 sigaction(SIGSEGV, 0x080477B0, 0x08047830) = 0
16826/1: 0.0337 sigaction(SIGSEGV, 0x080477B0, 0x08047830) = 0
16826/1: 0.0338 sigfillset(0xFEF896A0) = 0
16826/1: 0.0338 lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) =
0xFFBFFEFF [0x0000FFFF]
16826/1: 0.0339 umask(0) = 022
16826/1: 0.0339 umask(022) = 0
16826/1: 0.0341 getuid() = 113
[113]
16826/1: 0.0341 getuid() = 113
[113]
16826/1: 0.0342 getgid() = 10
[10]
16826/1: 0.0342 getgid() = 10
[10]
16826/1: 0.0344 sysconfig(_CONFIG_CLK_TCK) = 100
16826/1: 0.0345 sysconfig(_CONFIG_OPEN_FILES) = 256
16826/1: 0.0346 sysconfig(_CONFIG_CHILD_MAX) = 29995
16826/1: 0.0346 sysconfig(_CONFIG_NGROUPS) = 16
16826/1: 0.0347 fcntl(0, F_GETFL) = 8194
16826/1: 0.0349 stat64("/dev/null", 0x080478A0) = 0
16826/1: 0.0350 ioctl(0, TCGETS, 0x08047840) = 0
16826/1: 0.0350 llseek(0, 0, SEEK_CUR) = 288087
16826/1: 0.0351 fstat64(0, 0x080478A0) = 0
16826/1: 0.0352 fstat64(0, 0x080478A0) = 0
16826/1: 0.0352 ioctl(0, TCGETA, 0x08047820) = 0
16826/1: 0.0353 fstat64(0, 0x08047850) = 0
16826/1: 0.0354 fstat64(2, 0x080478E0) = 0
16826/1: 0.0354 ioctl(2, TCGETA, 0x08047860) = 0
16826/1: 0.0355 fstat64(1, 0x080478E0) = 0
16826/1: 0.0356 ioctl(1, TCGETA, 0x08047860) = 0
16826/1: 0.0356 lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) =
0xFFBFFEFF [0x0000FFFF]
16826/1: 0.0357 sysconfig(_CONFIG_SIGRT_MIN) = 41
16826/1: 0.0357 sysconfig(_CONFIG_SIGRT_MAX) = 48
16826/1: 0.0359 brk(0x080691F0) = 0
16826/1: 0.0360 brk(0x080711F0) = 0
16826/1: 0.0363 stat64("/", 0x08047810) = 0
16826/1: 0.0364 stat64(".", 0x080478A0) = 0
16826/1: 0.0365 stat64("/usr/spool/cron/atjobs", 0x08047810) = 0
16826/1: 0.0365 stat64(".", 0x080478A0) = 0
16826/1: 0.0366 stat64(".", 0x08047810) = 0
16826/1: 0.0367 openat(AT_FDCWD, "..", O_RDONLY|O_NDELAY|O_LARGEFILE) =
3
16826/1: 0.0368 fcntl(3, F_SETFD, 0x00000001) = 0
16826/1: 0.0369 fstat64(3, 0x08047240) = 0
16826/1: 0.0369 stat64("..", 0x08047780) = 0
16826/1: 0.0455 getdents64(3, 0xFEE14000, 8192) = 448
16826/1: 0.0456 stat64("../.", 0x080478A0) = 0
16826/1: 0.0457 stat64("../..", 0x080478A0) = 0
16826/1: 0.0458 stat64("../calebc", 0x080478A0) = 0
16826/1: 0.0459 stat64("../mpless", 0x080478A0) = 0
16826/1: 0.0459 stat64("../agt", 0x080478A0) = 0
16826/1: 0.0460 stat64("../wade", 0x080478A0) = 0
16826/1: 0.0461 stat64("../bparent", 0x080478A0) = 0
16826/1: 0.0462 stat64("../zz1mf", 0x080478A0) = 0
16826/1: 0.0463 stat64("../ldevan", 0x080478A0) = 0
16826/1: 0.0564 stat64("../bob", 0x080478A0) = 0
16826/1: 0.0565 stat64("../rml", 0x080478A0) = 0
16826/1: 0.0566 close(3) = 0
16826/1: 0.0567 openat(AT_FDCWD, "../..",
O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
16826/1: 0.0568 fcntl(3, F_SETFD, 0x00000001) = 0
16826/1: 0.0568 fstat64(3, 0x08047240) = 0
16826/1: 0.0569 stat64("../..", 0x08047810) = 0
16826/1: 0.0651 getdents64(3, 0xFEE14000, 8192) = 72
16826/1: 0.0651 stat64("../../.", 0x080478A0) = 0
16826/1: 0.0652 stat64("../../..", 0x080478A0) = 0
16826/1: 0.0653 stat64("../../home", 0x080478A0) = 0
16826/1: 0.0654 close(3) = 0
16826/1: 0.0654 openat(AT_FDCWD, "../../..",
O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
16826/1: 0.0655 fcntl(3, F_SETFD, 0x00000001) = 0
16826/1: 0.0656 fstat64(3, 0x08047240) = 0
16826/1: 0.0656 stat64("../../..", 0x08047780) = 0
16826/1: 0.0658 getdents64(3, 0xFEE14000, 8192) = 1088
16826/1: 0.0658 stat64("../../../.", 0x080478A0) = 0
16826/1: 0.0659 stat64("../../../..", 0x080478A0) = 0
16826/1: 0.0660 stat64("../../../system", 0x080478A0) = 0
16826/1: 0.0661 stat64("../../../jumpstart", 0x080478A0) = 0
16826/1: 0.0756 stat64("../../../kernel", 0x080478A0) = 0
16826/1: 0.0757 stat64("../../../export", 0x080478A0) = 0
16826/1: 0.0758 close(3) = 0
16826/1: 0.0758 openat(AT_FDCWD, "../../../..",
O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
16826/1: 0.0759 fcntl(3, F_SETFD, 0x00000001) = 0
16826/1: 0.0759 fstat64(3, 0x08047240) = 0
16826/1: 0.0760 stat64("../../../..", 0x08047810) = 0
16826/1: 0.0761 close(3) = 0
16826/1: 0.0762 readlink("/proc/self/path/a.out", "/usr/bin/i86/ksh93",
1025) = 18
16826/1: 0.0765 time() =
1270405573
16826/1: 0.0765 getpid() = 16826
[16825]
16826/1: 0.0766 getpid() = 16826
[16825]
16826/1: 0.0766 sigaction(SIGCLD, 0x08047D20, 0x08047DA0) = 0
16826/1: 0.0767 open64("/tmp/A", O_RDONLY) = 3
16826/1: 0.0768 fstat64(3, 0x08047BC0) = 0
16826/1: 0.0768 fstat64(3, 0x08047E50) = 0
16826/1: 0.0769 fcntl(3, F_DUPFD, 0x0000000A) = 10
16826/1: 0.0769 close(3) = 0
16826/1: 0.0770 fcntl(10, F_SETFD, 0x00000001) = 0
16826/1: 0.0770 ioctl(10, TCGETS, 0x08047C00) Err#25
ENOTTY
16826/1: 0.0771 llseek(10, 0, SEEK_CUR) = 0
16826/1: 0.0772 fstat64(10, 0x08047C60) = 0
16826/1: 0.0772 brk(0x080711F0) = 0
16826/1: 0.0773 brk(0x080791F0) = 0
16826/1: 0.0774 fstat64(10, 0x08047BD0) = 0
16826/1: 0.0774 llseek(10, 0, SEEK_CUR) = 0
16826/1: 0.0775 read(10, 0x08070020, 8192) = 41
16826/1: # / b i n / k s h\n t y p e s e t + A s p a c e s\n s p
a c
16826/1: e s [ 0 ] = ' '\n
16826/1: 0.0776 sysconfig(_CONFIG_PAGESIZE) = 4096
16826/1: 0.0779 read(10, 0x08070020, 8192) = 0
16826/1: 0.0780 fcntl(10, F_GETFL) = 8192
16826/1: 0.0780 Incurred fault #6, FLTBOUNDS %pc = 0xFED966EE
16826/1: siginfo: SIGSEGV SEGV_MAPERR addr=0x00000030
16826/1: 0.0781 Received signal #11, SIGSEGV [default]
16826/1: siginfo: SIGSEGV SEGV_MAPERR addr=0x00000030