Hunting for bug #18100 I built with 'mudflap' support activated and found many issues. Since issues araise even when the main() function body is EMPTY, I belive these are due to static initializations.
In order to reduce these issue, we should make sure that *every* global object is properly initialized before use. This can only be ensured (in a portable way) by accessing the global *only* trough a non-inlined function defined inside the same file that defines the global function OR by *creating* the static inside the accessor function itsef. I took the second path and already committed a patch for removing the global 'rcfile' object, replacing it with a RcInitFile::getDefaultInstance() static method that initialize the LogFile in it's body (as a function-static). This removes the mudflap reports about RcInitFile. I'm now working on LogFile, which is another one. This mail is just to let you know what I'm up to, and to warn you about other such cases. Gnash currently uses way too much globals, and we should protect all of them inside ad-hoc classes with the sole purpose of providing the global in a safe way. Eventually, these classes could be stored in yet another container object to represent a "run environment". This would allow us, for example, to play multiple movies by the same exectutable file (not impossible). --strk; /"\ ASCII Ribbon Campaign \ / Respect for low technology. X Keep e-mail messages readable by any computer system. / \ Keep it ASCII. _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

