Hi Arun, David:

> On 10/17/07, Curt Wohlgemuth <[EMAIL PROTECTED]> wrote:
> > As to the original problem I was having:  there seems to be a bug in
> >
> >         src/os-linux.h

I'm attaching a patch I made with

        diff -uprN

It applied fine on my clean tree with

        patch -p1

Please let me know if there's any problems with it.

Thanks,
Curt
diff -uprN old/libunwind/src/os-linux.h new/libunwind/src/os-linux.h
--- old/libunwind/src/os-linux.h        2007-10-05 13:53:09.000000000 -0700
+++ new/libunwind/src/os-linux.h        2007-10-18 09:11:30.000000000 -0700
@@ -228,7 +228,7 @@ maps_next (struct map_iterator *mi,
            {
              /* copy down the remaining bytes, if any */
              if (bytes_left > 0)
-               memcpy (mi->buf_end - mi->buf_size, mi->buf, bytes_left);
+               memmove (mi->buf_end - mi->buf_size, mi->buf, bytes_left);
 
              mi->buf = mi->buf_end - mi->buf_size;
              nread = read (mi->fd, mi->buf + bytes_left,
@@ -240,7 +240,7 @@ maps_next (struct map_iterator *mi,
                  /* Move contents to the end of the buffer so we
                     maintain the invariant that all bytes between
                     mi->buf and mi->buf_end are valid.  */
-                 memcpy (mi->buf_end - nread - bytes_left, mi->buf,
+                 memmove (mi->buf_end - nread - bytes_left, mi->buf,
                          nread + bytes_left);
                  mi->buf = mi->buf_end - nread - bytes_left;
                }
_______________________________________________
Libunwind-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/libunwind-devel

Reply via email to