kopia lustrzana https://gitlab.com/sane-project/website
388 wiersze
12 KiB
HTML
388 wiersze
12 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: scanimage -T using Purify...</TITLE>
|
|
<META NAME="Author" CONTENT="Henning Meier-Geinitz (henning@meier-geinitz.de)">
|
|
<META NAME="Subject" CONTENT="Re: scanimage -T using Purify...">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: scanimage -T using Purify...</H1>
|
|
<!-- received="Sun Apr 29 07:49:59 2001" -->
|
|
<!-- isoreceived="20010429144959" -->
|
|
<!-- sent="Sun, 29 Apr 2001 16:56:03 +0200" -->
|
|
<!-- isosent="20010429145603" -->
|
|
<!-- name="Henning Meier-Geinitz" -->
|
|
<!-- email="henning@meier-geinitz.de" -->
|
|
<!-- subject="Re: scanimage -T using Purify..." -->
|
|
<!-- id="20010429165603.A31678@vortex.swb.de" -->
|
|
<!-- inreplyto="E14tqrk-0004IJ-00@minerva" -->
|
|
<STRONG>From:</STRONG> Henning Meier-Geinitz (<A HREF="mailto:henning@meier-geinitz.de?Subject=Re:%20scanimage%20-T%20using%20Purify...&In-Reply-To=<20010429165603.A31678@vortex.swb.de>"><EM>henning@meier-geinitz.de</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Sun Apr 29 2001 - 07:56:03 PDT
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0308.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0306.html">John Buell: "Re: [discuss] SANE support"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0303.html">Petter Reinholdtsen: "scanimage -T using Purify..."</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0308.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#307">[ date ]</A>
|
|
<A HREF="index.html#307">[ thread ]</A>
|
|
<A HREF="subject.html#307">[ subject ]</A>
|
|
<A HREF="author.html#307">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Hi,
|
|
<BR>
|
|
<P>On Sun, Apr 29, 2001 at 03:03:56PM +0200, Petter Reinholdtsen wrote:
|
|
<BR>
|
|
<EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> UMR: Uninitialized memory read (2 times):
|
|
</EM><BR>
|
|
<EM>> * This is occurring while in:
|
|
</EM><BR>
|
|
<EM>> sanei_config_read [sanei_config.c:194]
|
|
</EM><BR>
|
|
<EM>> sane_umax_init [umax.c:5350]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> sane_get_devices [dll-s.c:15]
|
|
</EM><BR>
|
|
<EM>> main [scanimage.c:1468]
|
|
</EM><BR>
|
|
<EM>> * Reading 1 byte from 0xffbeec0f on the stack.
|
|
</EM><BR>
|
|
<EM>> * Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_umax_init.
|
|
</EM><BR>
|
|
<P>I don't know if this is really the culprit:
|
|
<BR>
|
|
<P>In sanei_config_read there is the following code:
|
|
<BR>
|
|
<P> len = strlen( str);
|
|
<BR>
|
|
while( isspace( str[--len]))
|
|
<BR>
|
|
str[len] = '\0';
|
|
<BR>
|
|
<P>Ok, if we have a str containing "\n" (empty line), len
|
|
<BR>
|
|
will be 1 and str[--len] is '\n' and after that len = 0. Next step:
|
|
<BR>
|
|
len is 0, --len is -1 --> str[-1] !
|
|
<BR>
|
|
<P>Something like
|
|
<BR>
|
|
<P> while((len > 0) && (isspace(str[--len])))
|
|
<BR>
|
|
<P>should fix this. Petter, can you check this with purify?
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> UMR: Uninitialized memory read (2 times):
|
|
</EM><BR>
|
|
<EM>> * This is occurring while in:
|
|
</EM><BR>
|
|
<EM>> sane_umax_init [umax.c:5337]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> sane_get_devices [dll-s.c:15]
|
|
</EM><BR>
|
|
<EM>> main [scanimage.c:1468]
|
|
</EM><BR>
|
|
<EM>> _start [crt1.o]
|
|
</EM><BR>
|
|
<EM>> * Reading 1 byte from 0xffbeec0f on the stack.
|
|
</EM><BR>
|
|
<EM>> * Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_umax_init.
|
|
</EM><BR>
|
|
<P>umax.c:
|
|
<BR>
|
|
len = strlen (config_line);
|
|
<BR>
|
|
if (config_line[len - 1] == '\n')
|
|
<BR>
|
|
{
|
|
<BR>
|
|
config_line[--len] = '\0';
|
|
<BR>
|
|
}
|
|
<BR>
|
|
<P>What happens if len==0? Similar things are probably in many backends.
|
|
<BR>
|
|
<P>[snipped all the sanei_config read stuff]
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> UMR: Uninitialized memory read:
|
|
</EM><BR>
|
|
<EM>> * This is occurring while in:
|
|
</EM><BR>
|
|
<EM>> sane_plustek_init [plustek.c:800]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> sane_get_devices [dll-s.c:15]
|
|
</EM><BR>
|
|
<EM>> main [scanimage.c:1468]
|
|
</EM><BR>
|
|
<EM>> _start [crt1.o]
|
|
</EM><BR>
|
|
<EM>> * Reading 1 byte from 0xffbeec0f on the stack.
|
|
</EM><BR>
|
|
<EM>> * Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_plustek_init.
|
|
</EM><BR>
|
|
<P>plustek.c:
|
|
<BR>
|
|
<P> len = strlen(dev_name);
|
|
<BR>
|
|
if( dev_name[len - 1] == '\n' )
|
|
<BR>
|
|
dev_name[--len] = '\0';
|
|
<BR>
|
|
<P>That's similar.
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> UMR: Uninitialized memory read:
|
|
</EM><BR>
|
|
<EM>> * This is occurring while in:
|
|
</EM><BR>
|
|
<EM>> sane_artec_init [artec.c:2570]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> sane_get_devices [dll-s.c:15]
|
|
</EM><BR>
|
|
<EM>> main [scanimage.c:1468]
|
|
</EM><BR>
|
|
<EM>> _start [crt1.o]
|
|
</EM><BR>
|
|
<EM>> * Reading 4 bytes from 0xffbef084 on the stack.
|
|
</EM><BR>
|
|
<EM>> * Address 0xffbef084 is local variable "version" in function init.
|
|
</EM><BR>
|
|
<P>artec.c:
|
|
<BR>
|
|
<P> DBG (7, "sane_init( version_code = %d, callback() = %p )\n",
|
|
<BR>
|
|
*version_code, authorize );
|
|
<BR>
|
|
|
|
<BR>
|
|
version_code may be NULL!
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> UMR: Uninitialized memory read (3 times):
|
|
</EM><BR>
|
|
<EM>> * This is occurring while in:
|
|
</EM><BR>
|
|
<EM>> bin_w_word [sanei_codec_bin.c:98]
|
|
</EM><BR>
|
|
<EM>> sanei_w_word [sanei_wire.c:215]
|
|
</EM><BR>
|
|
<EM>> sanei_w_array [sanei_wire.c:160]
|
|
</EM><BR>
|
|
<EM>> w_option_value [sanei_net.c:125]
|
|
</EM><BR>
|
|
<EM>> sanei_w_control_option_req [sanei_net.c:148]
|
|
</EM><BR>
|
|
<EM>> sanei_w_call [sanei_wire.c:405]
|
|
</EM><BR>
|
|
<EM>> * Reading 4 bytes from 0xffbef16c on the stack.
|
|
</EM><BR>
|
|
<P>Don't know.
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> Current file descriptors in use: 7
|
|
</EM><BR>
|
|
<EM>> FIU: file descriptor 0: <stdin>
|
|
</EM><BR>
|
|
<EM>> FIU: file descriptor 1: <stdout>
|
|
</EM><BR>
|
|
<EM>> FIU: file descriptor 2: <stderr>
|
|
</EM><BR>
|
|
<EM>> FIU: file descriptor 3: "/export/home/pere/gnu/etc/sane.d/net.conf", O_RDONLY
|
|
</EM><BR>
|
|
<EM>> * File info: srw-rw-rw- 0 root root 0 Apr 29 13:39
|
|
</EM><BR>
|
|
<EM>> * This file descriptor was allocated from:
|
|
</EM><BR>
|
|
<EM>> __open [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> _open [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> _endopen [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> fopen [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> sanei_config_open [sanei_config.c:119]
|
|
</EM><BR>
|
|
<EM>> sane_net_init [net.c:355]
|
|
</EM><BR>
|
|
<P>Does this mean the file descriptor for net.conf is still open? I don't
|
|
<BR>
|
|
understand this because there IS a fclose.
|
|
<BR>
|
|
<P><EM>> FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY
|
|
</EM><BR>
|
|
<EM>> * File info: ?r--r--r-- 1 root root 0 Apr 26 2000
|
|
</EM><BR>
|
|
<EM>> * This file descriptor was allocated from:
|
|
</EM><BR>
|
|
<EM>> __open64 [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> _open64 [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> _nsc_trydoorcall [libc.so.1]
|
|
</EM><BR>
|
|
<EM>> _door_gethostbyname_r [gethostby_door.c]
|
|
</EM><BR>
|
|
<EM>> _get_hostserv_inetnetdir_byname [netdir_inet.c]
|
|
</EM><BR>
|
|
<EM>> gethostbyname_r [gethostbyname_r.c]
|
|
</EM><BR>
|
|
<P>This isn't caused by SANE?
|
|
<BR>
|
|
<P><EM>> **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
|
|
</EM><BR>
|
|
<EM>> Purify: Searching for all memory leaks...
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Memory leaked: 3413 bytes (32.3%); potentially leaked: 0 bytes (0%)
|
|
</EM><BR>
|
|
<P>[lots of leaks in sanei_wire]
|
|
<BR>
|
|
<P>Are these the leaks you fixed or are these additional ones?
|
|
<BR>
|
|
<P><EM>> MLK: 24 bytes leaked in 3 blocks
|
|
</EM><BR>
|
|
<EM>> * This memory was allocated from:
|
|
</EM><BR>
|
|
<EM>> malloc [rtlib.o]
|
|
</EM><BR>
|
|
<EM>> strndup [strndup.c:33]
|
|
</EM><BR>
|
|
<EM>> sanei_config_get_string [sanei_config.c:169]
|
|
</EM><BR>
|
|
<EM>> sanei_config_attach_matching_devices [sanei_config2.c:95]
|
|
</EM><BR>
|
|
<EM>> sane_pie_init [pie.c:2937]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> * Block of 8 bytes (3 times); last block at 0x252fa0
|
|
</EM><BR>
|
|
<P>"type" isn't freed in sanei_config_attach_matching_devices.
|
|
<BR>
|
|
<P><EM>> MLK: 20 bytes leaked at 0x2467a8
|
|
</EM><BR>
|
|
<EM>> * This memory was allocated from:
|
|
</EM><BR>
|
|
<EM>> malloc [rtlib.o]
|
|
</EM><BR>
|
|
<EM>> attach [as6e.c:841]
|
|
</EM><BR>
|
|
<EM>> sane_as6e_init [as6e.c:627]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> sane_get_devices [dll-s.c:15]
|
|
</EM><BR>
|
|
<P>"dev" doesn't seem to be freed but i don't understand why.
|
|
<BR>
|
|
<P><EM>> MLK: 5 bytes leaked in 5 blocks
|
|
</EM><BR>
|
|
<EM>> * This memory was allocated from:
|
|
</EM><BR>
|
|
<EM>> malloc [rtlib.o]
|
|
</EM><BR>
|
|
<EM>> strndup [strndup.c:33]
|
|
</EM><BR>
|
|
<EM>> sanei_config_get_string [sanei_config.c:169]
|
|
</EM><BR>
|
|
<EM>> sane_mustek_init [mustek.c:4840]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<EM>> * Block of 1 byte (5 times); last block at 0x2474a8
|
|
</EM><BR>
|
|
<P>"word" doesn't seem to be freed on some ocasions.
|
|
<BR>
|
|
<P><EM>> MLK: 1 byte leaked at 0x24a480
|
|
</EM><BR>
|
|
<EM>> * This memory was allocated from:
|
|
</EM><BR>
|
|
<EM>> malloc [rtlib.o]
|
|
</EM><BR>
|
|
<EM>> strndup [strndup.c:33]
|
|
</EM><BR>
|
|
<EM>> sanei_config_get_string [sanei_config.c:169]
|
|
</EM><BR>
|
|
<EM>> sane_avision_init [avision.c:1393]
|
|
</EM><BR>
|
|
<EM>> init [dll.c:400]
|
|
</EM><BR>
|
|
<EM>> sane_dll_get_devices [dll.c:663]
|
|
</EM><BR>
|
|
<P>Same here.
|
|
<BR>
|
|
<P>Bye,
|
|
<BR>
|
|
Henning
|
|
<BR>
|
|
<P><PRE>
|
|
--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20scanimage%20-T%20using%20Purify...&In-Reply-To=<20010429165603.A31678@vortex.swb.de>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0308.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0306.html">John Buell: "Re: [discuss] SANE support"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0303.html">Petter Reinholdtsen: "scanimage -T using Purify..."</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0308.html">Petter Reinholdtsen: "Re: scanimage -T using Purify..."</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#307">[ date ]</A>
|
|
<A HREF="index.html#307">[ thread ]</A>
|
|
<A HREF="subject.html#307">[ subject ]</A>
|
|
<A HREF="author.html#307">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Sun Apr 29 2001 - 07:50:17 PDT</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|