From b9588ddf03982ec81244291ca59c17f8da4cc0e8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 19 Dec 2016 13:01:18 +0000 Subject: [PATCH] firmware: don't crash on artiq_compile'd kernels (fixes #641). --- artiq/firmware/libksupport/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/firmware/libksupport/lib.rs b/artiq/firmware/libksupport/lib.rs index 4543bce4c..4248e1a2d 100644 --- a/artiq/firmware/libksupport/lib.rs +++ b/artiq/firmware/libksupport/lib.rs @@ -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;