le stack n'est pas "zero initialized". tu peux le voir avec ce code http://pygments.org/demo/63047/?style=monokai
vu que la proc a() est rappelée de suite elle se retrouve avec la même stackframe que l’appel précédent et donc les même valeurs.
d’après le standard c++ seulement les variables statiques et de threads(thread_local) sont zero-initialized. les statiques aux lancement du programme et les variables de thread a chaque lancement d'un thread.
définition de zero-initialize:
To zero-initialize an object or reference of type T means:
if T is a scalar type (3.9), the object is set to the value 0 (zero), taken as an integral constant expression, converted to T;
if T is a (possibly cv-qualified) non-union class type, each non-static data member and each base-class subobject is zero-initialized and padding is initialized to zero bits;
if T is a (possibly cv-qualified) union type, the object’s first non-static named data member is zero-initialized and padding is initialized to zero bits;
if T is an array type, each element is zero-initialized;
if T is a reference type, no initialization is performed.