[sane-devel] problem in sanei_scsi.c (and hpusbscsi)

Rene Rebe rene.rebe at gmx.net
Sat Apr 13 02:40:45 BST 2002


Hi.

After some more hours of debugging (+libefence) ... I have not found
the cause for this segmentation fault (but I did not had a glibc with
debugging symbols) - this was on a glibc-2.1.3. I decided to proceed
on a glibc-2.2.5 system to take advantages of the new malloc testing
facilities. I'm surprised that I can not reproduce thi crashes anymore
... - Also not with libefence.

So has the place where the memory gets overwritten moved to another
location -> not triggering a sef-fault? Or was this a glibc-2.1.x
issue?

Any other idea or hint?

On: Fri, 12 Apr 2002 23:26:23 +0200 (CEST),
    Rene Rebe <rene.rebe at gmx.net> wrote:
> Hi.
> 
> On: Fri, 12 Apr 2002 08:58:13 -0400,
>     Douglas Gilbert <dgilbert at interlog.com> wrote:
> > Rene Rebe wrote:
> 
> > If you want the data fetched by the command that is what
> > you need. The response sg_header is in (dst, 36). This
> > assumes that 'dst' is the buffer read() used, that is:
> >    num = read(sg_fd, dst, count)
> > and 'count' should be >= sg_header_given_to_write.reply_len
> 
> Ahh ok. 
> 
> nread -= sizeof (req->sgdata.cdb.hdr);
> 
> The header size is substracted before ... - maybe we should change /
> move the DBG, it is quite missleading.
> 
> > > I do not get it ... - sorry.
> > 
> > Rene,
> > For documentation on the sg_header interface for the sg
> > driver see:
> > http://www.torque.net/sg/p/scsi-generic.txt
> > 
> > For documentation of the later sg_io_hdr interface see:
> > http://tldp.org/HOWTO/SCSI-Generic-HOWTO/
> > 
> > For examples of how to use the sg_header interface:
> > http://www.torque.net/sg and fetch sg_utils-0.98.tgz
> 
> ;-) Yeah. Thanks. But I do not want to write a whole new application,
> I only want to find why this memcpy fails (yes - I'm already debugging
> with libefence ...)
> 
> > Doug Gilbert
> 
> Much thanks
>   René

k33p h4ck1n6
  René

--  
René Rebe (Registered Linux user: #248718 <http://counter.li.org>)

eMail:    rene.rebe at gmx.net
          rene at rocklinux.org

Homepage: http://drocklinux.dyndns.org/rene/

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.




More information about the sane-devel mailing list