Namazu-devel-ja(旧)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in mknmz (namazu-bugs-ja#541)
- From: kpj@xxxxxxx
- Date: Tue, 12 Nov 2002 23:56:36 +0900 (JST)
- X-ml-name: namazu-devel-ja
- X-mail-count: 02697
PROBLEM:
========
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
/etc/cron.hourly/namazu-index-update:
Use of uninitialized value in read at /opt/namazu-2.0.10/bin/mknmz line 2333, <GEN20978> line 58778.
Use of uninitialized value in pack at /opt/namazu-2.0.10/bin/mknmz line 2373, <GEN20978> line 58778.
Use of uninitialized value in read at /opt/namazu-2.0.10/bin/mknmz line 2333, <GEN20978> line 58779.
Use of uninitialized value in pack at /opt/namazu-2.0.10/bin/mknmz line 2373, <GEN20978> line 58779.
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
DIAGNOSIS:
==========
It appears as if readw() returns an undefined value, in effect making
$baseleng becoming undefined:
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
my $baseleng = readw($fh_i);
read($fh_i, $baserecord, $baseleng);
[...]
my $tmp = pack("w", $baseleng);
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
This happens when read() returns immediately, most probably indicating
a broken database file:
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-
sub readw ($) {
my $fh = shift;
my $ret = '';
my $c;
while (read($fh, $c, 1)){
$ret .= $c;
last unless 0x80 & ord $c;
}
return unpack('w', $ret);
-=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=-