You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with BOOST_COMPUTE_DEBUG_KERNEL_COMPILATION, calls to build() which fail will cause the program source and build log to be printed to stderr.
However, when the program was loaded from a binary no source exists and thus the call to source() made by the debugging output will result in an exception being thrown. This case should be checked for and reported instead of crashing with the exception.
The text was updated successfully, but these errors were encountered:
I have a question about this issue. Is crashing not what the library should do? If building with a binary fails this indicates that something went wrong, for example that the binary was not compatible, etc. Is there a scenario where we want to continue the execution of the host program? Or do you mean that we don't want the exception to be thrown by get_info<std::string>(CL_PROGRAM_SOURCE) which fails to fetch the source code that is not available? In that case one could just catch exceptions of source() and then throw a new one indicating that no source code is available, like here (something went wrong with my code indentation, I read the rules).
If program::create_with_binary() or program::build() fails, we should throw an exception (and definitely never crash). I think all that would be needed is to try to call program::source() and not print out anything if it's a binary program. And perhaps program::source() should be robust to binary programs and return an empty string in that case.
However, I only saw this once haven't been able to reproduce it since (could have just been something weird going on with my system). I'll close this for now, but if you (or anyone) is able to reproduce this, please re-open with more information about the crash.
When compiling with
BOOST_COMPUTE_DEBUG_KERNEL_COMPILATION
, calls tobuild()
which fail will cause the program source and build log to be printed to stderr.However, when the program was loaded from a binary no source exists and thus the call to
source()
made by the debugging output will result in an exception being thrown. This case should be checked for and reported instead of crashing with the exception.The text was updated successfully, but these errors were encountered: