[Beignet] [PATCH] Fix the opencv_test_core/OCL_Arithm random segment fault.
Yang, Rong R
rong.r.yang at intel.com
Thu Nov 20 23:27:27 PST 2014
Yes, should also delete it if non user event, I will send a new patch.
> -----Original Message-----
> From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com]
> Sent: Friday, November 21, 2014 14:20
> To: Yang, Rong R
> Cc: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Fix the opencv_test_core/OCL_Arithm
> random segment fault.
>
> One concern is that if the event type is not CL_COMMAND_USER, then it will
> not delete this event even it has been completed.
>
> if(event->type != CL_COMMAND_USER)
> return;
>
> Is this expected behaviour?
>
> On Thu, Nov 20, 2014 at 01:59:12PM +0800, Yang Rong wrote:
> > If call cl_event_delete before call back, then event will be deleted
> > if application release event in the call back. So must move the
> cl_event_delete at the last.
> >
> > Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> > ---
> > src/cl_event.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/cl_event.c b/src/cl_event.c index e20342a..dbe81ea
> > 100644
> > --- a/src/cl_event.c
> > +++ b/src/cl_event.c
> > @@ -436,9 +436,6 @@ void cl_event_set_status(cl_event event, cl_int
> status)
> > event->status = status;
> > pthread_mutex_unlock(&event->ctx->event_lock);
> >
> > - if(event->status <= CL_COMPLETE)
> > - cl_event_delete(event);
> > -
> > /* Call user callback */
> > user_cb = event->user_cb;
> > while(user_cb) {
> > @@ -489,6 +486,8 @@ void cl_event_set_status(cl_event event, cl_int
> status)
> > }
> > }
> > event->waits_head = NULL;
> > + if(event->status <= CL_COMPLETE)
> > + cl_event_delete(event);
> > }
> >
> > void cl_event_update_status(cl_event event, int wait)
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list