newLISP Fan Club

Forum => newLISP in the real world => Topic started by: pahihu on March 03, 2010, 05:08:15 AM

Title: run-time check failed in function p_bayesTrain nl-math.c
Post by: pahihu on March 03, 2010, 05:08:15 AM
Hi,

I am porting newLISP to MS Visual C++ using the Windows 7 SDK.

In the p_bayesTrain function total should be allocated as an array:



total = alloca(maxIdx * sizeof(int));



Thanks,

pahihu
Title: Re: run-time check failed in function p_bayesTrain nl-math.c
Post by: Lutz on March 03, 2010, 06:50:03 AM
Thanks, I uploaded a corrected file here:



http://www.newlisp.org/downloads/development/latest/nl-math.c



strangely this never has caused a problem, probably because the stack allocated memory grows into unused areas.



Make sure, you also get the other updated files in the  development/latest/  directory for your build.