Re: [Plib-devel] patch for current svn
Brought to you by:
sjbaker
From: Fay J. F Dr C. U. 46 S. <joh...@eg...> - 2007-09-11 17:29:41
|
Olaf, Thank you very much for your contribution here. Did I get it right = that you have already put the patch into SVN, or do you need somebody to = put it in for you? John F. Fay Technical Fellow Jacobs Technology TEAS Group 850-883-1294=20 -----Original Message----- From: pli...@li... = [mailto:pli...@li...] On Behalf Of olaf = flebbe Sent: Friday, September 07, 2007 2:43 PM To: pli...@li... Subject: [Plib-devel] patch for current svn Hi, I just updated my patch for plib to the current SVN. There is a real bug in src/ssg/ssgLoadMDL_BGLTexture.cxx http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1584727&grou= p_id=3D382&atid=3D100382 If one would supply the Texture Loader with a character constant like "example.0af_100" the TextureLoader will bomb, because it will try to write into the constant placed into R/O memory. The bug is hidden under a workaround for standard conforming strchr() implementations which I cleaned up. (The rest of the patch) <standard blurb> strchr is defined in ANSI C++ =A721.4.4 as char *strchr( char *, int); const char *strchr( const char *, int); (the fine point: it is only required to be in <cstring>, but anyway) in contrast to ANSI C (For instance 7.21.5.2 in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf) char *strchr( const char *, int); This is one of the tiny differences between ANSI C++ and ANSI C.Please see for instance http://david.tribble.com/text/cdiffs.htm Unfortunatly GNU C++/glibc is not conforming to ANSI C++ by only defining char *strchr( const char *, int); // see yourself in <string.h> // <cstring> </standard blurb> The quintessence is: plib code compiles perfectly for Linux (except for the runtime problem mentioned above), but not for an ANSI C++ standard conforming strchr() implementation. As a side effect the code now works even for MSVC8. It should work for gcc, SUN Studio too. I like to get a fix upstream, because compiling plib is a prerequisite for the next planned FlightGear release. Please apply. Thanks, Olaf -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ plib-devel mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-devel |