From: Werner S. <sm...@ia...> - 2008-11-20 23:15:24
|
Hi, on MinGW/Win32 (3.4.5 and 4.3.2) example 29 crashes: Program received signal SIGSEGV, Segmentation fault. 0x10018c7c in pldtfac (vmin=-315.36000000000001, vmax=31536315.359999999, factor=0x23fbb0, start=0x23fba8) at Z:\DevZone\PLdev\plplot\src\pldtik.c:123 123 tm = *gmtime(&t); (gdb) print t $1 = -315 (gdb) print gmtime(&t) $2 = 0 (gdb) gmtime() is called with a negative value, 0 is returned, and if that is dereferenced than it crashes. I found two postings in the internet: http://markmail.org/message/55gg5qz6c26a4edd http://www.nntp.perl.org/group/perl.perl5.porters/2008/07/msg138464.html which basically say, that gmtime in MinGW doesn't except negative values and Visual C++ allows them only from the 2008 version on (which I happen to have installed, that's why it worked for me with Visual C++). I know that this time stuff is not finished yet, but still we should do something about that, e.g. checking the return value of gmtime not to be zero. Any comments? Werner -- Dr. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |