Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
594e2b68
Commit
594e2b68
authored
10 years ago
by
Yichao Yu
Browse files
Options
Downloads
Patches
Plain Diff
do not crash in clobj__* with nullptr input, which can happen in exception handler
parent
330fd7ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/c_wrapper/wrap_cl.cpp
+4
-1
4 additions, 1 deletion
src/c_wrapper/wrap_cl.cpp
with
4 additions
and
1 deletion
src/c_wrapper/wrap_cl.cpp
+
4
−
1
View file @
594e2b68
...
...
@@ -60,7 +60,7 @@ free_pointer_array(void **p, uint32_t size)
intptr_t
clobj__int_ptr
(
clobj_t
obj
)
{
return
obj
->
intptr
();
return
PYOPENCL_LIKELY
(
obj
)
?
obj
->
intptr
()
:
0l
;
}
static
PYOPENCL_INLINE
clobj_t
...
...
@@ -110,6 +110,9 @@ error*
clobj__get_info
(
clobj_t
obj
,
cl_uint
param
,
generic_info
*
out
)
{
return
c_handle_error
([
&
]
{
if
(
PYOPENCL_UNLIKELY
(
!
obj
))
{
throw
clerror
(
"NULL input"
,
CL_INVALID_VALUE
);
}
*
out
=
obj
->
get_info
(
param
);
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment