From 4df7941a9797542f461ed11730ad222c88faef81 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 23 Nov 2016 13:53:12 +0000 Subject: [PATCH] runtime: don't attempt to perform writeback if disabled in kernel. Otherwise, the startup kernel session hangs. --- artiq/runtime.rs/libksupport/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/runtime.rs/libksupport/lib.rs b/artiq/runtime.rs/libksupport/lib.rs index 027c0e3b3..08673e759 100644 --- a/artiq/runtime.rs/libksupport/lib.rs +++ b/artiq/runtime.rs/libksupport/lib.rs @@ -307,7 +307,10 @@ pub unsafe fn main() { (mem::transmute::(library.lookup("__modinit__")))(); send(&NowSave(NOW)); - attribute_writeback(library.lookup("typeinfo") as *const ()); + let typeinfo = library.lookup("typeinfo"); + if typeinfo != 0 { + attribute_writeback(typeinfo as *const ()) + } send(&RunFinished);