diff --git a/repos/base-nova/src/lib/base/stack.cc b/repos/base-nova/src/lib/base/stack.cc index 0475f5c535..1b4b02246b 100644 --- a/repos/base-nova/src/lib/base/stack.cc +++ b/repos/base-nova/src/lib/base/stack.cc @@ -113,6 +113,8 @@ void prepare_reinit_main_thread() ** Thread ** ************/ +/* prevent the compiler from optimizing out the 'this' pointer check */ +__attribute__((optimize("-fno-delete-null-pointer-checks"))) Native_utcb *Thread::utcb() { /*