From: Maurice L. <mj...@ga...> - 2001-11-29 05:59:36
|
Andrew Roach writes: > I finally found the error in X20C that was causing SIGFP errors. The error > was being tripped by a floating point exception in "plMinMax2dGrid", which > in turn was being caused by a miss-allocation in "plAlloc2dGrid". > "plAlloc2dGrid" has always worked in the past with DJGPP so why it stopped > working now, and only with X20C.C, I don't know. Any clues ? Luck? :) Probably calloc should always be used rather than malloc. If using unitialized data *consistently* produced a segv then the malloc would be better in theory to help find logic errors, in user code at least. In a library it's iffier, so the calloc is fine with me. -- Maurice LeBrun mj...@ga... |