http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51855
Bug #: 51855 Summary: improve calculation of stack bottom in libitm's undolog Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: libitm AssignedTo: torv...@gcc.gnu.org ReportedBy: torv...@gcc.gnu.org CC: al...@gcc.gnu.org, r...@gcc.gnu.org It would be good to improve how libitm calculates the bottom of the stack space of the current thread. It needs to do that to prevent rolling back transactional writes to this space because this would corrupt the stack frames of the transaction rollback functions. For 4.7, we handle this with __builtin_dwarf_cfa() and an additional buffer zone of 256 bytes to deal with another __builtin_memcpy() call that we need during rollback and whose stack frame size we can't measure at runtime. For 4.8, we should think about improving that, perhaps based on the existing boehm-gc code for this (GC_get_stack_base() in os_dep.c).