- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a kernel takes an argument which is a pointer to a __global enum type, and that enum type has at least one member defined as having the value of other another (previous) member, then attempting to use breakpoints in the kernel will cause a catastrophic crash of Visual Studio 2013.
The program being debugged will continue to run.
The problem is transitive through inclusion of the enum type in a struct.
OpenCL kernel code illustrating the issue:
typedef enum MyEnum_e { FIRST, SECOND = FIRST // further entries make no difference } MyEnum; __kernel void helloworld( __global MyEnum* in // remove this arg to avoid breakpoint-time crash ) { int i; i = 41; i = 42; // set breakpoint here i = 43; }
I have attached a screenshot showing VS2013 having crashed.
As a slight aside: I presume it is dangerous to use such types to pass data from the host to the device, or vice-versa; as I understand it the size of an enum type is compiler-dependent (see these StackOverflow threads).
I am using:
Visual Studio 2013 Ultimate.
Windows 7, 64-bit.
OpenCL runtime for Intel Core and Xeon Processors [...] version 4.5.0.8
Intel SDK for OpenCL Applications 2014 version 4.6.0.92
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max,
Thanks for reporting the issue! Could you please attach the whole HelloWorld example? I will try to reproduce the issue and file it with our OpenCL Debugger team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Max,
I am in the process of reproducing your issue: haven't been able to do it yet due to the problems with my development system. Are you creating a buffer for the integer that you are passing into your code when uncommenting __global MyEnum* in ?
Thank you for your patience!
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you creating a buffer for the integer that you are passing into your code when uncommenting __global MyEnum* in ?
The C++ code that I attached above (HelloWorld.cpp) is exactly the code that I'm running to trigger the bug. It does not use OpenCL buffers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page