* Tim Rice wrote on Mon, Jan 18, 2010 at 07:17:52PM CET: > On Sat, 16 Jan 2010, Ralf Wildenhues wrote: > > > > * Tim Rice wrote on Tue, Jan 12, 2010 at 01:48:43AM CET: > > > > > > iASBOX > > > > > ...... > > > > > > > > > > I've seen this before back in autoconf-2.59.
> > Can you check whether that configure script has the problematic EOF > > marker crossing a 1024 byte boundary? > > As you note below, the _ of the closing the _ASBOX marker is on a 1024 > byte boundry. > > I suspect that here-doc within here-doc is a red herring; but I'm not > > sure. Can you check whether the problem disappears if, in the 2.65 > > test, you change the one problematic EOF marker pair from _ASBOX to a > > different string with the same length? > > Changing to a different string of the same length produces the same error. > > > > I can add or subtract a space and get different results. > > Which ksh version is this? > Version M-12/28/93e-SCO OK, thanks. Let's see if this bug is easy to trigger. Can you run the attached script, with $shell set to /bin/ksh or another suspect shell, and report its output? It might take quite a while, so another option is to initialize $t with something a bit less than 1000 bytes and try fewer loops. If that doesn't expose the bug, then it might be that some earlier construct in the configure script cause the shell to corrupt internal data structures. In that case the only easy strategy I can think of to try to delimit the issue would be to try shorter here-document EOF markers in one of the failing configure scripts (and varying the script length before the failure code manually) to see whether there is a minimum length where it fails. (When cut-and-pasting, be sure to have no trailing whitespace in the script.) Thanks, Ralf --- snip --- #! /bin/sh shell='/bin/sh' nl=' ' st=0 : >script-$$ chmod +x script-$$ t= for i in 0 1; do for j in 0 1 2 3 4 5 6 7 8 9; do for k in 0 1 2 3 4 5 6 7 8 9; do for l in 0 1 2 3 4 5 6 7 8 9; do t=$t$nl marker= for len in 1 2 3 4 5 6 7 8 9; do marker=E$marker for backsl in '' \\; do echo "\ #! $shell$t cat > file-$$ <<$backsl$marker foo $marker " > script-$$ ./script-$$ || { echo "failed for $shell with marker $backsl$marker after $i$j$k$l newlines" >&2 st=1 } done done done done done done rm -f script-$$ file-$$ exit $st --- snip ---