Khronos Public Bugzilla
Bug 388 - cl.hpp trigger stl debug
cl.hpp trigger stl debug
Status: RESOLVED FIXED
Product: OpenCL
Classification: Unclassified
Component: Header Files
1.1
PC All
: P3 normal
: ---
Assigned To: Benedict Gaster
OpenCL Working Group
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-02 16:58 PST by Maa
Modified: 2013-10-31 02:34 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maa 2010-12-02 16:58:46 PST
IN
	cl_int enqueueAcquireGLObjects(
         const VECTOR_CLASS<Memory>* mem_objects = NULL,
         const VECTOR_CLASS<Event>* events = NULL,
         Event* event = NULL) const
     {
		 return detail::errHandler(
			 ::clEnqueueAcquireGLObjects(
			 object_,
			 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
			 (mem_objects != NULL && mem_objects->size() > 0 ) ? (const cl_mem *) &mem_objects->front() : NULL,
			 (events != NULL) ? (cl_uint) events->size() : 0,
			 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
                 (cl_event*) event),
             __ENQUEUE_ACQUIRE_GL_ERR);
     }

the line
(mem_objects != NULL ) ? (const cl_mem *) &mem_objects->front() : NULL,
should be
(mem_objects != NULL && mem_objects->size() > 0 ) ? (const cl_mem *) &mem_objects->front() : NULL,

this happen in a bunch of other members

Thanks Maa
Comment 1 Bruce Merry 2013-10-31 02:34:01 PDT
Thanks for the report, and apologies that it is has taken so long for somebody to look at this. I've committed a fix (to all places .front() is called, not just enqueueAcquireGLObjects) to the Khronos internal version, and the fix will go out when a new version of cl.hpp is released.