Hi!

----

The following test should print two "PIPED" lines to stderr when the
SIGPIPE signal occurs:
-- snip --
$ ksh93 -c 'g="false" ; trap "print -u2 PIPED ; \$g && exit 0 ; g=true"
PIPE ; while true ; do echo hello ; done' | head
-- snip --

In theory this should print:
-- snip --
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
PIPED
PIPED
-- snip --

... but ast-ksh.2009-06-22 prints the "hello" lines and then crashes
like this:
-- snip --
program terminated by signal SEGV (no mapping at the fault address)
0xffffffff7efb7430: sigaction+0x0054:   stx      %o1, [%fp + 2015]
Current function is _ast_signal
  125           if (sigaction(sig, &na, &oa))
(dbx) where
  [1] sigaction(0xd, 0xffffffff7f800078, 0xffffffff7f800058,
0xffffffff7f14e900, 0xffffffff7f14ef80, 0xffffffff7f148000), at
0xffffffff7efb7430 
  ---- 1 following frame from gwindows -- possible stack overflow
=>[2] _ast_signal(sig = 13, fun = 0x10002c198 = &sh_fault()), line 125
in "signal.c"
  [3] sh_fault(sig = 13), line 70 in "fault.c"
  [4] __sighndlr(0xd, 0x0, 0xffffffff7f800520, 0x10002c198, 0x0, 0xc),
at 0xffffffff7efc341c 
  ---- called from signal handler with signal 13 (SIGPIPE) ------
  [5] __write(0x20, 0x100354b00, 0x2001, 0x1, 0xffffffff7ed02a00,
0x80808080), at 0xffffffff7efc8684 
  [6] sfwr(f = 0x10033aff0, buf = 0x100354b00, n = 8193U, disc = (nil)),
line 206 in "sfwr.c"
  [7] _sfflsbuf(f = 0x10033aff0, c = -1), line 96 in "sfflsbuf.c"
  [8] sfsync(f = 0x10033aff0), line 133 in "sfsync.c"
  [9] _sfphead(p = 0x100357370, f = 0x10033b0a0, n = 1), line 124 in
"sfpool.c"
  [10] _sfpmove(f = 0x10033b0a0, type = 0), line 241 in "sfpool.c"
  [11] _sfmode(f = 0x10033b0a0, wanted = 2, local = 0), line 426 in
"sfmode.c"
  [12] sfset(f = 0x10033b0a0, flags = 2112, set = 0), line 46 in
"sfset.c"
  [13] b_print(argc = 3, argv = 0x100566f00, extra = 0x100337900), line
276 in "print.c"
  [14] sh_exec(t = 0x100566e50, flags = 4), line 995 in "xec.c"
  [15] sh_exec(t = 0x1005670d0, flags = 4), line 1544 in "xec.c"
  [16] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [17] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [18] sh_chktrap(), line 417 in "fault.c"
  [19] sh_exec(t = 0x100566b20, flags = 4), line 2189 in "xec.c"
  [20] sh_exec(t = 0x100566e10, flags = 4), line 1544 in "xec.c"
  [21] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [22] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [23] sh_chktrap(), line 417 in "fault.c"
  [24] sh_exec(t = 0x100566860, flags = 4), line 2189 in "xec.c"
  [25] sh_exec(t = 0x100566ae0, flags = 4), line 1544 in "xec.c"
  [26] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [27] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [28] sh_chktrap(), line 417 in "fault.c"
  [29] sh_exec(t = 0x1005665a0, flags = 4), line 2189 in "xec.c"
  [30] sh_exec(t = 0x100566820, flags = 4), line 1544 in "xec.c"
  [31] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [32] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [33] sh_chktrap(), line 417 in "fault.c"
  [34] sh_exec(t = 0x1005662e0, flags = 4), line 2189 in "xec.c"
  [35] sh_exec(t = 0x100566560, flags = 4), line 1544 in "xec.c"
  [36] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [37] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [38] sh_chktrap(), line 417 in "fault.c"
  [39] sh_exec(t = 0x100566020, flags = 4), line 2189 in "xec.c"
  [40] sh_exec(t = 0x1005662a0, flags = 4), line 1544 in "xec.c"
  [41] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [42] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [43] sh_chktrap(), line 417 in "fault.c"
  [44] sh_exec(t = 0x100565d60, flags = 4), line 2189 in "xec.c"
  [45] sh_exec(t = 0x100565fe0, flags = 4), line 1544 in "xec.c"
  [46] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [47] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [48] sh_chktrap(), line 417 in "fault.c"
  [49] sh_exec(t = 0x100565a70, flags = 4), line 2189 in "xec.c"
  [50] sh_exec(t = 0x100565d20, flags = 4), line 1544 in "xec.c"
  [51] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [52] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [53] sh_chktrap(), line 417 in "fault.c"
  [54] sh_exec(t = 0x1005657b0, flags = 4), line 2189 in "xec.c"
  [55] sh_exec(t = 0x100565a30, flags = 4), line 1544 in "xec.c"
  [56] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [57] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [58] sh_chktrap(), line 417 in "fault.c"
  [59] sh_exec(t = 0x1005654f0, flags = 4), line 2189 in "xec.c"
  [60] sh_exec(t = 0x100565770, flags = 4), line 1544 in "xec.c"
  [61] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [62] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [63] sh_chktrap(), line 417 in "fault.c"
  [64] sh_exec(t = 0x100565230, flags = 4), line 2189 in "xec.c"
  [65] sh_exec(t = 0x1005654b0, flags = 4), line 1544 in "xec.c"
  [66] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [67] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [68] sh_chktrap(), line 417 in "fault.c"
  [69] sh_exec(t = 0x100564f70, flags = 4), line 2189 in "xec.c"
  [70] sh_exec(t = 0x1005651f0, flags = 4), line 1544 in "xec.c"
  [71] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [72] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [73] sh_chktrap(), line 417 in "fault.c"
  [74] sh_exec(t = 0x100564cb0, flags = 4), line 2189 in "xec.c"
  [75] sh_exec(t = 0x100564f30, flags = 4), line 1544 in "xec.c"
  [76] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [77] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [78] sh_chktrap(), line 417 in "fault.c"
  [79] sh_exec(t = 0x100564980, flags = 4), line 2189 in "xec.c"
  [80] sh_exec(t = 0x100564c00, flags = 4), line 1544 in "xec.c"
  [81] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [82] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [83] sh_chktrap(), line 417 in "fault.c"
  [84] sh_exec(t = 0x1005646c0, flags = 4), line 2189 in "xec.c"
  [85] sh_exec(t = 0x100564940, flags = 4), line 1544 in "xec.c"
  [86] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [87] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [88] sh_chktrap(), line 417 in "fault.c"
  [89] sh_exec(t = 0x100564400, flags = 4), line 2189 in "xec.c"
  [90] sh_exec(t = 0x100564680, flags = 4), line 1544 in "xec.c"
  [91] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [92] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [93] sh_chktrap(), line 417 in "fault.c"
  [94] sh_exec(t = 0x100564140, flags = 4), line 2189 in "xec.c"
  [95] sh_exec(t = 0x1005643c0, flags = 4), line 1544 in "xec.c"
  [96] sh_eval(iop = 0x100371930, mode = 0), line 505 in "xec.c"
  [97] sh_trap(trap = 0x100370000 "print -u2 PIPED ; $g && exit 0 ;
g=true", mode = 0), line 455 in "fault.c"
  [98] sh_chktrap(), line 417 in "fault.c"
  [99] sh_exec(t = 0x100563e80, flags = 4), line 2189 in "xec.c"
  [100] sh_exec(t = 0x100564100, flags = 4), line 1544 in "xec.c"
-- snip --
(e.g. it looks like an endless loop which eats-up all the stack)

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to