Bug 70891 - CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log
Summary: CL_INVALID_BUILD_OPTIONS results in CL_INVALID_DEVICE when asking for build log
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Francisco Jerez
QA Contact:
Depends on:
Reported: 2013-10-26 12:18 UTC by Bruno Jiménez
Modified: 2013-10-29 19:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

clover_get_program_build_info_error_check.patch (529 bytes, patch)
2013-10-26 17:59 UTC, Francisco Jerez
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Jiménez 2013-10-26 12:18:29 UTC
When you use an invalid option to build a program, you get the CL_INVALID_BUILD_OPTIONS error, but somehow it also makes the device used for the build invalid. So if you after that asks for the build log with clGetProgramBuildInfo you get also a CL_INVALID_DEVICE.

Way to reproduce this bug:
1- Clone tstellard's repo of opencl-examples: http://cgit.freedesktop.org/~tstellar/opencl-example/
2- Modify hello-world.c at line 112 to some invalid options.
3- Compile and run it, it fails at the clGetPrograBuildInfo some lines below.

Expected output:
Maybe an empty log and a CL_INVALID_BUILD_OPTIONS error.

This bug may make difficult to track problems because one may think that the device is wrong, when all that has happened is that he have used wrong build options.
Comment 1 Francisco Jerez 2013-10-26 17:59:43 UTC
Created attachment 88156 [details] [review]

The attached patch should help.

Comment 2 Bruno Jiménez 2013-10-26 23:12:19 UTC

The patch you submitted fixes it.

Comment 3 Francisco Jerez 2013-10-29 19:47:40 UTC
This should be fixed in master now [1].


[1] http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8f89fc5cbd41a45130630080ffc921c60604545

bug/show.html.tmpl processed on Oct 23, 2016 at 23:52:39.
(provided by the Example extension).