Hi, thanks for the patch. I've sent version 2 of the patch with additional fixes to this list.
Marek On Sun, Sep 9, 2018 at 10:08 PM, Josh Pieper <j...@pobox.com> wrote: > And apparently I am incapable of operating git send-email, so it > failed to include my context: > > When using Freecad, I was getting intermittent segfaults inside of > mesa. I traced it down to this path in st_cb_drawpixels.c where the > result of pipe_transfer_map wasn't being checked. In my case, it was > returning NULL because nouveau_bo_new returned ENOENT. I'm by no > means a mesa developer, but this patch solves the problem for me and > seems reasonable enough. > > Thanks! > -Josh > > Josh Pieper wrote: >> --- >> src/mesa/state_tracker/st_cb_drawpixels.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c >> b/src/mesa/state_tracker/st_cb_drawpixels.c >> index cb50b7104a..8d39b8a01b 100644 >> --- a/src/mesa/state_tracker/st_cb_drawpixels.c >> +++ b/src/mesa/state_tracker/st_cb_drawpixels.c >> @@ -566,6 +566,9 @@ make_texture(struct st_context *st, >> dest = pipe_transfer_map(pipe, pt, 0, 0, >> PIPE_TRANSFER_WRITE, 0, 0, >> width, height, &transfer); >> + if (!dest) { >> + return NULL; >> + } >> >> >> /* Put image into texture transfer. >> -- >> 2.17.1 >> > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev