[Starkit] FreeBSD core dumps when wrapping big files!
Jeff Hobbs
jeffh at activestate.com
Fri Dec 15 09:56:12 CET 2006
Joey Mukherjee wrote:
> I have tried taking random files out and really the only difference
> seems to be size. I have narrowed down to a magic number, though.
> When the file in my starpack to be wrapped is greater than 67107626,
> but smaller than 67117434, it will core regardless of the files
> inside. I have tried with several different files removed and added
> to get to this range. Its harder than it looks to narrow this down!
I have no idea if this is coincidence, but 2^25 == 67108864.
Out of curiosity, what are the resultant sizes of the starpack?
> (As an aside: Does anyone know of an easy way to create a file of an
> exact size?)
Any random file? Yes, open / seek / write 1 char / close works on most
systems. However, this may leave you with a sparse file (depends on fs), and
I'm not sure if that will perturb your results.
set file test.txt
set size [expr 2<<25-1]
set fid [open $file w]
seek $fid $size
puts $fid "" ; # just a newline
close $fid
Jeff
More information about the Starkit
mailing list