diff -uNr busybox-1.31.1/miscutils/less.c busybox-1.31.1.mod/miscutils/less.c --- busybox-1.31.1/miscutils/less.c 2019-06-10 13:50:53.000000000 +0300 +++ busybox-1.31.1.mod/miscutils/less.c 2019-11-11 21:31:58.406733857 +0200 @@ -278,6 +278,7 @@ #define kbd_input (G.kbd_input ) #define INIT_G() do { \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ + asm volatile("":::"memory"); \ less_gets_pos = -1; \ empty_line_marker = "~"; \ current_file = 1; \ diff -uNr busybox-1.31.1/networking/httpd.c busybox-1.31.1.mod/networking/httpd.c --- busybox-1.31.1/networking/httpd.c 2019-06-10 13:50:53.000000000 +0300 +++ busybox-1.31.1.mod/networking/httpd.c 2019-11-11 21:31:58.406733857 +0200 @@ -485,6 +485,7 @@ #define INIT_G() do { \ setup_common_bufsiz(); \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ + asm volatile("":::"memory"); \ IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \ IF_FEATURE_HTTPD_RANGES(range_start = -1;) \ bind_addr_or_port = "80"; \ diff -uNr busybox-1.31.1/runit/svlogd.c busybox-1.31.1.mod/runit/svlogd.c --- busybox-1.31.1/runit/svlogd.c 2019-06-10 13:50:53.000000000 +0300 +++ busybox-1.31.1.mod/runit/svlogd.c 2019-11-11 21:31:58.406733857 +0200 @@ -244,6 +244,7 @@ #define INIT_G() do { \ setup_common_bufsiz(); \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ + asm volatile("":::"memory"); \ linemax = 1000; \ /*buflen = 1024;*/ \ linecomplete = 1; \ diff -uNr busybox-1.31.1/shell/ash.c busybox-1.31.1.mod/shell/ash.c --- busybox-1.31.1/shell/ash.c 2019-10-21 17:54:40.000000000 +0300 +++ busybox-1.31.1.mod/shell/ash.c 2019-11-11 21:31:58.410067203 +0200 @@ -490,6 +490,7 @@ #define backgndpid (G_misc.backgndpid ) #define INIT_G_misc() do { \ (*(struct globals_misc**)&ash_ptr_to_globals_misc) = xzalloc(sizeof(G_misc)); \ + asm volatile("":::"memory"); \ barrier(); \ curdir = nullstr; \ physdir = nullstr; \ @@ -1543,6 +1544,7 @@ #define stackbase (G_memstack.stackbase ) #define INIT_G_memstack() do { \ (*(struct globals_memstack**)&ash_ptr_to_globals_memstack) = xzalloc(sizeof(G_memstack)); \ + asm volatile("":::"memory"); \ barrier(); \ g_stackp = &stackbase; \ g_stacknxt = stackbase.space; \ @@ -2166,6 +2168,7 @@ #define INIT_G_var() do { \ unsigned i; \ (*(struct globals_var**)&ash_ptr_to_globals_var) = xzalloc(sizeof(G_var)); \ + asm volatile("":::"memory"); \ barrier(); \ for (i = 0; i < ARRAY_SIZE(varinit_data); i++) { \ varinit[i].flags = varinit_data[i].flags; \ @@ -3348,6 +3351,7 @@ static struct alias **atab; // [ATABSIZE]; #define INIT_G_alias() do { \ + asm volatile("":::"memory"); \ atab = xzalloc(ATABSIZE * sizeof(atab[0])); \ } while (0) @@ -8073,6 +8077,7 @@ static struct tblentry **cmdtable; #define INIT_G_cmdtable() do { \ + asm volatile("":::"memory"); \ cmdtable = xzalloc(CMDTABLESIZE * sizeof(cmdtable[0])); \ } while (0)