Re: scanimage -T using Purify...

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Sun May 13 2001 - 01:54:59 PDT

  • Next message: Oliver Rauch: "Re: SV: Xsane - (w)insane?"

    Hi,

    On Fri, May 11, 2001 at 12:43:47AM +0200, Petter Reinholdtsen wrote:
    > **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 4903) ****
    > UMR: Uninitialized memory read (2 times):
    > * This is occurring while in:
    > sane_umax_init [umax.c:5337]

    That's config_line[len - 1]

    > **** Purify instrumented /export/home/pere/gnu/bin/scanimage (pid 4903) ****
    > 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:161]
    > 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 0xffbef12c on the stack.

    I don't understand yet. It's occuring when reading *v while
    w->direction==WIRE_ENCODE. The only thing I can think of is that len
    may be set incorrectly or something like that.

    Which scanner do you use on the other computer? Can you try to find
    out which option value is set with control_option in this case?

    > MLK: 1263 bytes leaked in 29 blocks
    > * This memory was allocated from:
    > malloc [rtlib.o]
    > sanei_w_array [sanei_wire.c:146]

    --> w->direction == WIRE_DECODE

    > 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]

    I will look for this one and the other sanei_w leaks. Some of them
    seem to be located in net.c in reality.

    > MLK: 20 bytes leaked at 0x271f50
    > * 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:661]
    > sane_get_devices [dll-s.c:15]

    attach: memory (dev) isn't freed if diver isn't found. Added to TODO
    list.

    > MLK: 11 bytes leaked at 0x2756b8
    > * 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:661]

    Memory from strdup isn't freed if driver not found (-->TODO).

    > MLK: 1 byte leaked at 0x27a248
    > * This memory was allocated from:
    > malloc [rtlib.o]
    > strndup [strndup.c:33]
    > sanei_config_get_string [sanei_config.c:172]
    > sane_avision_init [avision.c:1393]
    > init [dll.c:400]
    > sane_dll_get_devices [dll.c:661]

    word isn't freed sometimes (maybe if cp == line?) (--> TODO)

    Bye,
      Henning

    --
    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 May 13 2001 - 01:51:41 PDT