[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ksh core dumps


	I'm using ksh to run some scripts that generate java code. INormally I 
would run these scripts on a Solaris (thus the ksh) but it's so much 
faster on my Linux box... :-)
	Anyway, today I got one script which is crashing ksh !!!

~/javaSDK/generate> sdk SQLViewEntity
Memory fault (core dumped)

	Now I don't publish this script here because I can't (it's 
copyrighted), because when on it's own this script does not crash ksh 
but it does when invoked by the other scripts, and because I could not 
isolate the cause of the crash. It involves a for loop with an empty 
list of parameters, accessing ${12}. Well, maybe I could send the 
scripts to someone interested in debugging this though.
	But basically it seems to execute some code inside a loop where it 
should not go since there is nothing to iterate on (for i in ; do ....; 
done). I say that because by changing what's inside the loop I get it 
not to crash anymore. Now I cannot pinpoint what I have to remove. T  
here are many unrelated things I can remove that fix that (but my 
script no longer does what it's supposed to).
	So I downloaded the source code, compiled it, and run my script with 
the compiled code and... it does not crash ! So there is nothing I can 
debug unfortunately. Now the ksh I get (after stripping) is different 
from what I have installed on my machine, although they are both from 
the same package version (maybe the compiler is slightly different).
	I feel the ksh in the distribution should be fixed. But how ?

	I can send the core file to anyone who asks, all gdb tells me is:
Core was generated by `ksh ./450s.MIRXxx.ulinks.java'.
Program terminated with signal 11, Segmentation fault.
#0  0x400516c3 in ?? ()

	A simple recompilation probably is not enough. I believe the core dump 
is caused by writing or reading past the end of some array/string so 
the bug might seem to go away with a recompilation but would come back.

I have:
- a hamm installation
- ii  pdksh           5.2.13-3       A public domain version of the 
Korn shell
- pdksh_5.2.13.orig.tar.gz     -> the source code
- pdksh_5.2.13-3.diff.gz       -> the debian patches

Francois Gouget
fgouget@mygale.org -- http://www.mygale.org/~fgouget/

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: