I ran 'scanimage -T' after compiling the backend using Purify. I only
have a network scanner available, so only init is called for the other
backends. I found and fixed a few bugs in the net backend, but the
rest I do not quite understand. Here are the generated report:
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128 at Sun Apr 29 13:39:28 2001)
* Purify 5.3 Solaris 2 (32-bit), Copyright (C) 1992-2001 Rational Software Corp. All rights reserved.
* For contact information type: "purify -help"
* For TTY output, use the option "-windows=no"
* Command-line: /export/home/pere/gnu/bin/scanimage -T
* Options settings: -purify \
-purify-home=/store/store/palantir/purify/ver-1.7/opt/purify/releases/purify-5.3-solaris2@sun4os58
* License successfully checked out.
* Command-line: /export/home/pere/gnu/bin/scanimage -T
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read (2 times):
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_umax_init [umax.c:5350]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_umax_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read (2 times):
* This is occurring while in:
sane_umax_init [umax.c:5337]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
_start [crt1.o]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_umax_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_tamarack_init [tamarack.c:906]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_tamarack_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_plustek_init [plustek.c:808]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_plustek_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sane_plustek_init [plustek.c:800]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
_start [crt1.o]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_plustek_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
ABR: Array bounds read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_mustek_init [mustek.c:5082]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0x23bb61 in the zero'd data, bss section.
* Address 0x23bb61 is 25 bytes past start of global variable "pure_thread_stacks_overlap".
This is defined in scanimage.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_microtek2_init [microtek2.c:1001]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 3 bytes past start of local variable "md" in function sane_microtek2_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sane_artec_init [artec.c:2570]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
_start [crt1.o]
* Reading 4 bytes from 0xffbef084 on the stack.
* Address 0xffbef084 is local variable "version" in function init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_artec_init [artec.c:2632]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_artec_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read:
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_agfafocus_init [agfafocus.c:1297]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_agfafocus_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read (9 times):
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_st400_init [st400.c:696]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 1041 bytes below frame pointer in function sane_st400_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read (24 times):
* This is occurring while in:
sanei_config_read [sanei_config.c:194]
sane_mustek_pp_init [mustek_pp.c:3233]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
main [scanimage.c:1468]
* Reading 1 byte from 0xffbeec0f on the stack.
* Address 0xffbeec0f is 23 bytes past start of local variable "io_mode" in function sane_mustek_pp_init.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
UMR: Uninitialized memory read (3 times):
* This is occurring while in:
bin_w_word [sanei_codec_bin.c:98]
sanei_w_word [sanei_wire.c:215]
sanei_w_array [sanei_wire.c:160]
w_option_value [sanei_net.c:125]
sanei_w_control_option_req [sanei_net.c:148]
sanei_w_call [sanei_wire.c:405]
* Reading 4 bytes from 0xffbef16c on the stack.
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
Current file descriptors in use: 7
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 3: "/export/home/pere/gnu/etc/sane.d/net.conf", O_RDONLY
* File info: srw-rw-rw- 0 root root 0 Apr 29 13:39
* This file descriptor was allocated from:
__open [libc.so.1]
_open [libc.so.1]
_endopen [libc.so.1]
fopen [libc.so.1]
sanei_config_open [sanei_config.c:119]
sane_net_init [net.c:355]
FIU: file descriptor 4: "/etc/.name_service_door", O_RDONLY
* File info: ?r--r--r-- 1 root root 0 Apr 26 2000
* This file descriptor was allocated from:
__open64 [libc.so.1]
_open64 [libc.so.1]
_nsc_trydoorcall [libc.so.1]
_door_gethostbyname_r [gethostby_door.c]
_get_hostserv_inetnetdir_byname [netdir_inet.c]
gethostbyname_r [gethostbyname_r.c]
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
Purify: Searching for all memory leaks...
Memory leaked: 3413 bytes (32.3%); potentially leaked: 0 bytes (0%)
MLK: 1263 bytes leaked in 29 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_option_descriptor [sanei_wire.c:325]
sanei_w_ptr [sanei_wire.c:194]
* Block of 156 bytes at 0x23d0e0
* Block of 89 bytes at 0x27b718
* Block of 78 bytes at 0x244dd0
* Block of 74 bytes at 0x23d988
* Block of 69 bytes at 0x23cf00
* Block of 67 bytes at 0x27b9c0
* Block of 64 bytes at 0x23cb88
* Block of 60 bytes at 0x23bfe0
* Block of 53 bytes at 0x27bb90
* Block of 49 bytes at 0x23de10
* Block of 47 bytes at 0x23c738
* Block of 45 bytes at 0x23c958
* Block of 42 bytes (2 times); last block at 0x27bed8
* Block of 38 bytes (2 times); last block at 0x27cbb8
* Block of 34 bytes (2 times); last block at 0x27c780
* Block of 32 bytes at 0x245138
* Block of 31 bytes at 0x23d370
* Block of 27 bytes (2 times); last block at 0x27cde0
* Block of 25 bytes at 0x27d0a8
* Block of 21 bytes at 0x23d770
* Block of 17 bytes at 0x27c0a0
* Block of 1 byte (4 times); last block at 0x27c3e0
MLK: 1044 bytes leaked in 29 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_ptr [sanei_wire.c:186]
sanei_w_option_descriptor_ptr [sanei_wire.c:363]
sanei_w_array [sanei_wire.c:160]
sanei_w_option_descriptor_array [sanei_net.c:131]
sanei_w_call [sanei_wire.c:410]
* Block of 36 bytes (29 times); last block at 0x27cf60
MLK: 393 bytes leaked in 29 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_option_descriptor [sanei_wire.c:324]
sanei_w_ptr [sanei_wire.c:194]
* Block of 23 bytes at 0x23ce90
* Block of 18 bytes (3 times); last block at 0x27cd78
* Block of 17 bytes (2 times); last block at 0x23d920
* Block of 16 bytes (4 times); last block at 0x27d040
* Block of 15 bytes (3 times); last block at 0x27cb50
* Block of 13 bytes (3 times); last block at 0x27b958
* Block of 12 bytes (2 times); last block at 0x27bb30
* Block of 11 bytes (4 times); last block at 0x27c720
* Block of 10 bytes (4 times); last block at 0x27c1e0
* Block of 9 bytes (2 times); last block at 0x27c380
* Block of 8 bytes at 0x2450d8
MLK: 172 bytes leaked in 28 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_array [sanei_wire.c:160]
sanei_w_option_descriptor [sanei_wire.c:354]
sanei_w_ptr [sanei_wire.c:194]
* Block of 11 bytes (2 times); last block at 0x27b580
* Block of 10 bytes (2 times); last block at 0x23d4b8
* Block of 9 bytes (2 times); last block at 0x23dbb8
* Block of 8 bytes at 0x23c0d8
* Block of 7 bytes (4 times); last block at 0x27bc88
* Block of 6 bytes (3 times); last block at 0x23db58
* Block of 5 bytes (6 times); last block at 0x27b520
* Block of 4 bytes (5 times); last block at 0x27d178
* Block of 3 bytes (2 times); last block at 0x27d1d0
* Block of 2 bytes at 0x27b828
MLK: 144 bytes leaked in 8 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
sanei_w_option_descriptor [sanei_wire.c:354]
sanei_w_ptr [sanei_wire.c:194]
sanei_w_option_descriptor_ptr [sanei_wire.c:363]
sanei_w_array [sanei_wire.c:160]
* Block of 28 bytes at 0x23da28
* Block of 24 bytes (2 times); last block at 0x23de98
* Block of 20 bytes at 0x23c070
* Block of 16 bytes at 0x27bc20
* Block of 12 bytes (2 times); last block at 0x27d118
* Block of 8 bytes at 0x27b7c8
MLK: 116 bytes leaked at 0x244c28
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
sanei_w_option_descriptor_array [sanei_net.c:131]
sanei_w_call [sanei_wire.c:410]
fetch_options [net.c:253]
sane_net_control_option [net.c:719]
MLK: 84 bytes leaked in 7 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_ptr [sanei_wire.c:186]
sanei_w_option_descriptor [sanei_wire.c:337]
sanei_w_ptr [sanei_wire.c:194]
sanei_w_option_descriptor_ptr [sanei_wire.c:363]
sanei_w_array [sanei_wire.c:160]
* Block of 12 bytes (7 times); last block at 0x27c7f8
MLK: 24 bytes leaked in 3 blocks
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_pie_init [pie.c:2937]
init [dll.c:400]
* Block of 8 bytes (3 times); last block at 0x252fa0
MLK: 20 bytes leaked at 0x2467a8
* This memory was allocated from:
malloc [rtlib.o]
attach [as6e.c:841]
sane_as6e_init [as6e.c:627]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
sane_get_devices [dll-s.c:15]
MLK: 16 bytes leaked at 0x2431e0
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_ptr [sanei_wire.c:186]
sanei_w_device_ptr [sanei_wire.c:314]
sanei_w_array [sanei_wire.c:160]
sanei_w_get_devices_reply [sanei_net.c:79]
sanei_w_call [sanei_wire.c:410]
MLK: 16 bytes leaked in 2 blocks
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_st400_init [st400.c:692]
init [dll.c:400]
* Block of 8 bytes (2 times); last block at 0x2448c8
MLK: 16 bytes leaked at 0x252940
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_device [sanei_wire.c:306]
sanei_w_ptr [sanei_wire.c:194]
MLK: 16 bytes leaked at 0x252a08
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_device [sanei_wire.c:308]
sanei_w_ptr [sanei_wire.c:194]
MLK: 12 bytes leaked at 0x243248
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_device [sanei_wire.c:305]
sanei_w_ptr [sanei_wire.c:194]
MLK: 11 bytes leaked at 0x24a078
* This memory was allocated from:
malloc [rtlib.o]
strdup [libc.so.1]
attach [as6e.c:845]
sane_as6e_init [as6e.c:627]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
MLK: 8 bytes leaked at 0x2405b0
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_umax_init [umax.c:5349]
init [dll.c:400]
MLK: 8 bytes leaked at 0x240790
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_mustek_init [mustek.c:5077]
init [dll.c:400]
MLK: 8 bytes leaked at 0x240a90
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_microtek2_init [microtek2.c:992]
init [dll.c:400]
MLK: 8 bytes leaked at 0x249900
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_microtek_init [microtek.c:2909]
init [dll.c:400]
MLK: 8 bytes leaked at 0x249f68
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_coolscan_init [coolscan.c:3245]
init [dll.c:400]
MLK: 8 bytes leaked at 0x24a190
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sanei_config_attach_matching_devices [sanei_config2.c:95]
sane_sharp_init [sharp.c:2414]
init [dll.c:400]
MLK: 7 bytes leaked at 0x2529a8
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_device [sanei_wire.c:307]
sanei_w_ptr [sanei_wire.c:194]
MLK: 5 bytes leaked in 5 blocks
* This memory was allocated from:
malloc [rtlib.o]
sanei_w_array [sanei_wire.c:145]
bin_w_string [sanei_codec_bin.c:84]
sanei_w_string [sanei_wire.c:221]
sanei_w_option_descriptor [sanei_wire.c:323]
sanei_w_ptr [sanei_wire.c:194]
* Block of 1 byte (5 times); last block at 0x27c328
MLK: 5 bytes leaked in 5 blocks
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sane_mustek_init [mustek.c:4840]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
* Block of 1 byte (5 times); last block at 0x2474a8
MLK: 1 byte leaked at 0x24a480
* This memory was allocated from:
malloc [rtlib.o]
strndup [strndup.c:33]
sanei_config_get_string [sanei_config.c:169]
sane_avision_init [avision.c:1393]
init [dll.c:400]
sane_dll_get_devices [dll.c:663]
Purify Heap Analysis (combining suppressed and unsuppressed blocks)
Blocks Bytes
Leaked 160 3413
Potentially Leaked 0 0
In-Use 217 7162
----------------------------------------
Total Allocated 377 10575
**** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 24128) ****
* Program exited with status code 0.
* 13 access errors, 48 total occurrences.
* 3413 bytes leaked.
* 0 bytes potentially leaked.
* Basic memory usage (including Purify overhead):
2015028 code
196516 data/bss
270336 heap (peak use)
2544 stack
* Shared library memory usage (including Purify overhead):
1456 libpure_solaris2_init.so.1 (shared code)
252 libpure_solaris2_init.so.1 (private data)
57186 libsocket.so.1_pure_p3_c0_530_58_32_70260 (shared code)
4680 libsocket.so.1_pure_p3_c0_530_58_32_70260 (private data)
952598 libnsl.so.1_pure_p3_c0_530_58_32_883500 (shared code)
134416 libnsl.so.1_pure_p3_c0_530_58_32_883500 (private data)
128338 libm.so.1_pure_p3_c0_530_58_32_102424 (shared code)
1188 libm.so.1_pure_p3_c0_530_58_32_102424 (private data)
254590 libjpeg.so.62_pure_p3_c0_530_58_32_146784 (shared code)
2476 libjpeg.so.62_pure_p3_c0_530_58_32_146784 (private data)
2092 libdl.so.1_pure_p3_c0_530_58_32_4308 (shared code)
4 libdl.so.1_pure_p3_c0_530_58_32_4308 (private data)
1067444 libc.so.1_pure_p3_c0_530_58_32_1113260 (shared code)
31140 libc.so.1_pure_p3_c0_530_58_32_1113260 (private data)
13248 libinternal_stubs.so.1 (shared code)
896 libinternal_stubs.so.1 (private data)
16440 libmp.so.2_pure_p3_c0_530_58_32_24968 (shared code)
868 libmp.so.2_pure_p3_c0_530_58_32_24968 (private data)
14108 libc_psr.so.1_pure_p3_c0_530_58_32 (shared code)
0 libc_psr.so.1_pure_p3_c0_530_58_32 (private data)
28445 nss_files.so.1_pure_p3_c0_530_58_32_43576 (shared code)
1652 nss_files.so.1_pure_p3_c0_530_58_32_43576 (private data)
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Sun Apr 29 2001 - 06:01:31 PDT