1. A method for facilitating operation of a software transactional memory system with stack locations comprising the steps of: providing a software transactional memory system, the software transactional memory system interacting with a compiler; and if the compiler determines at compile time that a particular address for a variable in an original code segment is a stack location, that the stack location is live on entry to a current transaction scope, and that the particular address of the variable has not been taken and passed to another thread, then making a change to the original code segment in a manner that ensures failure atomicity.