On 2015/03/11 10:23, David Coppa wrote:
> On Wed, Mar 11, 2015 at 10:11 AM, Alessandro DE LAURENZIS
> <[email protected]> wrote:
> > Dear misc@ readers,
>
> ...
>
> > But when I try to scan (or also just launch xsane):
> >
> > just22@poseidon:[~]> scanimage --format=tiff > ./scanner_test.tiff
> > Abort trap
> >
> >
> > This is what is reported in /var/log/messages:
> >
> > just22@poseidon:[~]> tail /var/log/messages
> > Mar 11 10:05:59 poseidon scanimage: io/hpmud/musb.c 527: invalid
> > set_altinterface 7/1/2 altset=0: Invalid argument
> > Mar 11 10:05:59 poseidon scanimage: backwards memcpy
>
> This is the culprit.
> graphics/sane-backends needs to be patched: probably a memcpy->memmove.
>
> Ciao!
> David
>
We are going to see a number of these with 5.7 and backtraces are
important to track them down.
I get a segfault instead though, this is going to be more than
just an s/memcpy/memmove.
(gdb) bt
#0 0x000000ab666e0130 in memcpy (dst0=0x7f7ffffc3b60, src0=Variable "src0" is
not available.
)
at /usr/src/lib/libc/string/memcpy.c:94
#1 0x000000aba9191309 in prepare_socket (if_name=0xabe0069ff0 "vlan447",
local_sa=0xabe0069f80, broadcast_sa=0xabe0069f90, dest_sa=0x7f7ffffc3b60)
at pixma_bjnp.c:930
#2 0x000000aba9193a06 in sanei_bjnp_find_devices (conf_devices=0xaba95a5d20,
attach_bjnp=0xaba917f7ed <attach_bjnp>, pixma_devices=0xaba939d4e0)
at pixma_bjnp.c:1796
#3 0x000000aba917feb2 in sanei_pixma_collect_devices (
conf_devices=0xaba95a5d20, pixma_devices=0xaba939d4e0)
at pixma_io_sanei.c:377
#4 0x000000aba918285e in sanei_pixma_find_scanners (conf_devices=0xaba95a5d20)
at pixma_common.c:1154
#5 0x000000aba917b010 in find_scanners () at pixma.c:231
#6 0x000000aba917d7ea in sane_pixma_get_devices (device_list=0x7f7ffffd4a38,
local_only=0) at pixma.c:1306
#7 0x000000abf5505e5b in sane_dll_get_devices (device_list=0x7f7ffffd4b48,
local_only=0) at dll.c:1059
#8 0x000000abf54f2fce in sane_get_devices (dl=0x7f7ffffd4b48, local=0)
at dll-s.c:17
#9 0x000000a953e072f8 in main (argc=2, argv=0x7f7ffffd5418)
at scanimage.c:1985
...
(gdb) list
925 }
926
927
928 /* send broadcasts to the broadcast address of the interface
*/
929
930 memcpy(dest_sa, broadcast_sa, sa_size(dest_sa) );
931 dest_sa -> ipv4.sin_port = htons(BJNP_PORT_SCAN);
932 if ( (socket = create_broadcast_socket( &local_sa_copy) ) !=
-1)
933 {
934 PDBG (bjnp_dbg (LOG_INFO, "%s is IPv4 capable, sending
broadcast, socket = %d\n",