Skip to content

Commit 0e06817

Browse files
authored
Retain NSError we rethrow to avoid an UAF. (#302)
1 parent 7d7617d commit 0e06817

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/compilation.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ end
126126
MTLComputePipelineState(dev, fun)
127127
catch err
128128
isa(err, NSError) || rethrow()
129+
retain(err)
129130

130131
# the back-end compiler likely failed
131132
# XXX: check more accurately? the error domain doesn't help much here

0 commit comments

Comments
 (0)