All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 33494] crash during (or at end) of map loading in ut2004
Date: Tue, 25 Jan 2011 12:13:11 -0800 (PST)	[thread overview]
Message-ID: <20110125201311.E2A2013004E@annarchy.freedesktop.org> (raw)
In-Reply-To: <bug-33494-502@http.bugs.freedesktop.org/>

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

--- Comment #1 from XoD <xoddark@gmail.com> 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.

  reply	other threads:[~2011-01-25 20:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 20:08 [Bug 33494] New: crash during (or at end) of map loading in ut2004 bugzilla-daemon
2011-01-25 20:13 ` bugzilla-daemon [this message]
2011-01-25 20:14 ` [Bug 33494] " bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110125201311.E2A2013004E@annarchy.freedesktop.org \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.