Results 1 to 2 of 2

Thread: Nvidia OpenCL driver crash when an invalid context is passed

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    1

    Nvidia OpenCL driver crash when an invalid context is passed

    When I pass a random value to
    clCreateCommandQueue(random_context_value, device, NULL, NULL),

    App crashes in the Nvidia OpenCL driver, but from spec, it should return an CL_INVALID_CONTEXT error.

    Pass other invalid CL handles to OpenCL API aslo causes crash.

    Is this a bug of Nvidia OpenCL driver?

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Nvidia OpenCL driver crash when an invalid context is passed

    Yes, but it's a hard-to-avoid bug. There's really no way for the driver to know if a pointer you pass in is garbage without trying to access it, or keeping a list somewhere of all possible valid pointers and then checking this list on every call. My guess is that they're not doing that, so if your pointer points to an invalid location, the driver tries to access it, and you get a memory access violation.

Similar Threads

  1. First NVIDIA OpenCL Driver Version?
    By skewray in forum OpenCL
    Replies: 4
    Last Post: 03-14-2013, 03:46 PM
  2. Replies: 0
    Last Post: 02-13-2013, 06:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •