This patch moves the call to the stack init data sharing function before the splitting of threads into master and workers. This ensures that the initialization happens for all active warp master threads. Test is modified appropriately.
This leads to usage of statically allocated shared data before their initialization in runtime structures by master thread in kernel_init() function. New patch available with worker and master-side initialization.