[Beignet] [PATCH] Fix a event segment fault.
Xing, Homer
homer.xing at intel.com
Tue Oct 29 06:28:43 CET 2013
This patch looks good to me.
-----Original Message-----
From: beignet-bounces at lists.freedesktop.org [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Yang Rong
Sent: Tuesday, October 29, 2013 1:40 PM
To: beignet at lists.freedesktop.org
Cc: Yang, Rong R
Subject: [Beignet] [PATCH] Fix a event segment fault.
If event type is CL_COMMAND_USER, event->queue is NULL, cause segment fault.
Change the order to fix it.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
src/cl_api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cl_api.c b/src/cl_api.c index f668ec6..2aca3f8 100644
--- a/src/cl_api.c
+++ b/src/cl_api.c
@@ -1228,8 +1228,8 @@ clGetEventProfilingInfo(cl_event event,
CHECK_EVENT(event);
- if (!(event->queue->props & CL_QUEUE_PROFILING_ENABLE) ||
- event->type == CL_COMMAND_USER ||
+ if (event->type == CL_COMMAND_USER ||
+ !(event->queue->props & CL_QUEUE_PROFILING_ENABLE) ||
event->status != CL_COMPLETE) {
err = CL_PROFILING_INFO_NOT_AVAILABLE;
goto error;
--
1.8.1.2
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list