Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - gmtime() bug (or deeper?): Page 1 of 8 (8 Items)
   
gmtime() bug (or deeper?)  
I am debugging an app, and data is being corrupted during a call to gmtime(). I looked through the source and traced the
 app via gdb, and the culprit appears to be the _Getrules() function in /lib/c/time/xgetrules.c. I have yet to prove 
this, but at the very beginning of that function, I see the following:

#ifdef __QNX__
	static const char *olddst;
	static Dstrule *rules;
#else
	static const char *olddst = 0;
	static Dstrule *rules = NULL;
#endif

followed by code that references both olddst and rules before they are initialized. Does that make any sense?

(p.s. is this a good forum to post this sort of thing, or should I use one of the forums under the OS project?)