This contrived code, boiled down from something that should work:
void my_call(dense &Out, const usize &Ncol)
#define NCOL 5 // OK
//#define NCOL 35000 // freezes (not inf. loop)
//#define NCOL 7*Ncol // Win7 says "process stopped working"
dense v = fill(2.f, NCOL, 3);
dense a(NCOL, 2);
a = replace_row(a, 0, sqrt(v.row(0)) + sqrt(v.row(1)));
a = replace(a, 0, NCOL, 1, 1, v);
Out = a.row(0);
...actually does work with the 1st #define. Using the 2nd #define produces an executable that freezes (0% proc. time). Using the 3rd #define, and calling with Ncol = 5000, produces an executable that Win7 says "process has stopped working".
Why am I so lucky?