Hi, thanks for this. I've added it to our list of fixes for our upcoming release.
Bill. On 21 January 2014 15:12, Gisle Vanem <gisle.va...@gmail.com> wrote: > I've built stat.exe (from tests/rand/stat.c etc.) and got a stack-fault > as the program enters main(). A small fix for me was to declare the locals > 'fvec' and 'zvec' as static. A diff: > > --- Git-latest/tests/rand/stat.c 2013-12-08 10:39:18 +0000 > +++ tests/rand/stat.c 2014-01-21 13:18:07 +0000 > @@ -225,8 +225,8 @@ > " maximum value when converting real numbers to > integers\n" \ > ""; > > - mpf_t fvec[FVECSIZ]; > - mpz_t zvec[FVECSIZ]; > + static mpf_t fvec[FVECSIZ]; > + static mpz_t zvec[FVECSIZ]; > unsigned long int f, n, vecentries; > char *filen; > FILE *fp; > > ---------- > > Or adding '-stack:5000000' to the link stage works too. > > From MSDN I read the _chk_stk function is by default called when the local > variables exceeds 4K bytes. But the MSVC compiler doesn't warn me! > Disassembling stat.obj > reveals this: > > _main: > push ebp > mov ebp,esp > mov eax,0x002abb98 > call j^__chkstk > > Believe it or not, but EAX=0x002abb98 = 2.8 MByte!! > I've build with option '-Gs'. See here: > http://support.microsoft.com/kb/100775 > > --gv > > -- > You received this message because you are subscribed to the Google Groups > "mpir-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to mpir-devel+unsubscr...@googlegroups.com. > To post to this group, send email to mpir-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/mpir-devel. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at http://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/groups/opt_out.