fix shmalloc stress tests. Thanks to Nadezhda.