Re: For the past few years I've had occasional and random bouts of internal...
"Michael Richards" <michael-97jfqw80gc4sA/[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 13 Mar 2006 09:59:28 +0000, James Collings wrote...
Hi,
You've caught me trying to provoke mpatrol into complaining. Alas
changing this to 27 does not make a difference. The backtrace calls says:
#10 0x281be8dc in __mp_findsource () from /usr/local/lib/libmpatrol.so
#11 0x2835f99d in tzsetwall () from /lib/libc.so.5
#12 0x2835fd41 in localtime_r () from /lib/libc.so.5
#13 0x283602a5 in ctime_r () from /lib/libc.so.5
#14 0x28118eaa in TLogger::writeLog (this=0x805c000, filename=0x8055ef6
"request.cpp", lineno=248) at tlogger.cpp:65
#15 0x0804f1cb in main () at request.cpp:248
Tracing through the code for libc the tzsetwall is trying to manipulate
the environment.
-Michael
> Are you sure your problems are not in the array:
>
> char ctimestamp[20];
>
> http://www.opengroup.org/onlinepubs/009695399/functions/ctime.html
>
> gives the length of buffer required as being 26 chars.
>
> I'd suspect that your
>
> ctime_r(&now,&ctimestamp[0]);
>
> clobbers pointers :-)
>
> Just make the allocation:
>
> char ctimestamp[27];
>
> and it should work.
>
> HTH,
>
> James
_________________________________________________________________
http://fastmail.ca/ - Fast Secure Web Email for Canadians
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/