--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
+++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
@@ -858,7 +858,7 @@ void os::verify_stack_alignment() {
  * updates (JDK-8023956).
  */
 void os::workaround_expand_exec_shield_cs_limit() {
-#if defined(IA32)
+#if defined(IA32) && !defined(ZERO)
   assert(Linux::initial_thread_stack_bottom() != NULL, "sanity");
   size_t page_size = os::vm_page_size();
 
