run-time check failed in function p_bayesTrain nl-math.c

Q&A's, tips, howto's
Locked
pahihu
Posts: 1
Joined: Wed Mar 03, 2010 1:03 pm

run-time check failed in function p_bayesTrain nl-math.c

Post by pahihu »

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: run-time check failed in function p_bayesTrain nl-math.c

Post by Lutz »

Thanks, I uploaded a corrected file here:

http://www.newlisp.org/downloads/develo ... /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.

Locked