libMesh/libmesh — pull request #274 by dschwen (2014-06-17 23:22:06+00:00)
Title: set correct stack size after AutoDiff

Every function parser object must know about the maximum stack size that is needed to evaluate its bytecode. ```AutoDiff``` did _not_ recalculate the needed stack size for the derivative, which can (and probably will) lead to memory corruption (whelp!) when evaluating an unoptimized derivative.

Note that calling Optimize will recalculate the maximum stack size and avoid this error.

This PR (which needs a bit more testing, so don't merge yet) will recalculate the stack size and re-allocate it in case of the non-thread-safe eval mode.