The padding variable used for setting a stack offset (from a page boundary) was dead code as pointed out by Hal a while back. This change fixes that by making the pointer a volatile. Also, the stacksize is doubled based of observations of requesting staggered stacksizes. It was seen on some machines that an offset was created during thread creation (before the dummy alloca() of padding) when a staggered stack size (not a multiple of a page) was requested. Because this offset was created before the alloca(), the alloca() would actually eliminate the offset. To avoid this, we added a multiple of two to the stacksize increase. This way, we can then have the stacksize be as large as the user requested, and also retain the stack offset.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM