Re: Sane 1.01pre5 segfaults in RedHat 5.1 (net)

Milon Firikis (milonf@ariadne-t.gr)
Thu, 22 Apr 1999 13:25:55 +0300

Petter Reinholdtsen wrote:
>
> [Milon Firikis]
> > I keep getting SIGSEGVs in redhat 5.1
> >
> > I have reported it some time ago... but I am not qualified to find
> > the solution...
>
> Try running 'SANE_DEBUG_NET=128 scanimage -T' and report the output.
> What is the exact command line when crashing? Try rerunning that
> command line with 'SANE_DEBUG_NET=128' set.
>
> The pnm backend is supposed to be full of bugs. Maybe you should try
> with another backend?

Let's forget the pnm backend. I have to admit I wasn't clear enough. The
offending command is scanimage -L. So I just disabled the pnm entry from
the dll.conf. That means that I have only the net backend listed in
there and so it should return "No available devices" or something.
Instead of that I am getting...

[13:19:32~(1003)]$>SANE_DEBUG_NET=128 gdb scanimage
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -L
Starting program: /usr/local/bin/scanimage -L
[sanei_init_debug]: Setting debug level of net to 128.
[net] adding backend localhost

Program received signal SIGSEGV, Segmentation fault.
0x40099d43 in memcpy (dstpp=0x804e328, srcpp=0x804e32c, len=4294967292)
at ../sysdeps/generic/memcpy.c:57
../sysdeps/generic/memcpy.c:57: No such file or directory.
(gdb) up
#1 0x400fd9fe in sanei_w_space (w=0x804e2e4, howmuch=4) at
sanei_wire.c:84
84 memcpy (w->buffer.start, w->buffer.curr, left_over);
(gdb) print left_over
$1 = 4294967292
(gdb) print *w
$2 = {version = 0, direction = WIRE_DECODE, status = 22, codec = {
w_byte = 0x400fd458 <bin_w_byte>, w_char = 0x400fd458 <bin_w_byte>,
w_word = 0x400fd520 <bin_w_word>, w_string = 0x400fd4ac
<bin_w_string>},
buffer = {size = 8192, curr = 0x804e32c "", start = 0x804e328 "\001",
end = 0x804e328 "\001"}, io = {fd = 6, read = 0x400bec60 <__read>,
write = 0x400becb0 <__write>}}
(gdb) info locals
w = (Wire *) 0x804e2e4
nbytes = 4294967292
left_over = 4294967292
fd = 6
nread = 0
nwritten = 0
(gdb)

Assuming I haven't configured properly the saned service in inetd.conf,
scanimage shouldn't core dump, should it?

MF

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com