Skip to content

Commit

Permalink
firmware: don't crash on artiq_compile'd kernels (fixes #641).
Browse files Browse the repository at this point in the history
whitequark committed Dec 19, 2016
1 parent 68b2373 commit b9588dd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artiq/firmware/libksupport/lib.rs
Original file line number Diff line number Diff line change
@@ -272,6 +272,9 @@ unsafe fn attribute_writeback(typeinfo: *const ()) {
objects: *const *const ()
}

// artiq_compile'd kernels don't include type information
if typeinfo.is_null() { return }

let mut tys = typeinfo as *const *const Type;
while !(*tys).is_null() {
let ty = *tys;

0 comments on commit b9588dd

Please sign in to comment.