[Bug 33494] crash during (or at end) of map loading in ut2004

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugs.freedesktop.org/show_bug.cgi?id=33494

--- Comment #1 from XoD <xoddark@xxxxxxxxx> 2011-01-25 12:13:11 PST ---
If I add a sprintf before memcpy in r600_upload.c I was able to debug in
r600_upload_buffer.

The call stack was :

#0  memcpy() at ../sysdeps/x86_64/memcpy.S:267
#1  fprintf() at /usr/include/bits/string3.h:52
#2  r600_upload_buffer() at r600_upload.c:109
#3  r600_upload_user_buffers() at r600_buffer.c:239
#4  evergreen_vertex_buffer_update() at evergreen_state.c:1372
#5  st_draw_vbo() at state_tracker/st_draw.c:712
...


Patch :
diff --git a/src/gallium/drivers/r600/r600_upload.c
b/src/gallium/drivers/r600/r600_upload.c
index 44102ff..ba19185 100644
--- a/src/gallium/drivers/r600/r600_upload.c
+++ b/src/gallium/drivers/r600/r600_upload.c
@@ -103,7 +103,11 @@ int r600_upload_buffer(struct r600_upload *upload,
unsigned offset,
        }

        in_ptr = in_buffer->user_buffer;
-       memcpy(upload->ptr + upload->offset, (uint8_t *) in_ptr + offset,
size);
+       uint8_t * ptr_src = (uint8_t *) upload->ptr + upload->offset;
+       uint8_t * ptr_dest = (uint8_t *) in_ptr + offset;
+       //R600_ERR("memcpy src %d dest %d size %d\n", ptr_src, ptr_dest, size);
+       fprintf(stdout, "memcpy src %p dest %p size %d\n", ptr_src, ptr_dest,
size);
+       memcpy(ptr_src, ptr_dest, size);
        *out_offset = upload->offset;
        *out_size = upload->size;
        *out_buffer = NULL;

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux