From: Atri <bad...@ai...> - 2012-04-10 21:25:36
|
On Sat, 2012-02-18 at 11:37 -0800, Alan W. Irwin wrote: > On 2012-02-18 04:42+0530 Atri wrote: > > > Ok, seems I jumped the gun there. Example 21 from latest svn seems to be > > creating some problems. Here is the result of test_diff.sh > > > > =============================================================== > > lua > > Missing examples : > > Differing postscript output : 21 > > Missing stdout : > > Differing stdout : > > WARNING: Some PostScript or stdout results were different > > =============================================================== > > Hi Atri: > > The first thing I noticed about the above result is there is no > complaint about missing example 00. So something appears to be wrong > with the conditions you used for this test. My best guess > is you probably had a dirty build tree with some stale 5.9.9 results > mixed in with the trunk version results. > > So could you please repeat this test starting from a fresh svn > checkout to an initially empty source tree, and then build starting > from an empty build tree? That fresh checkout should capture my > recent build system changes so (with luck) there should be no need for > you to patch anything to get the build to work. > Hi! Sorry for the long delay in between my last test and the present one. I got the svn version to build on openSUSE:Factory (with Lua 5.2) finally. I used for my build the svn trunk directory (at revision 12185) without applying any patch except this following one, which is necessary to avoid warnings with rpmlint during the build [1]. ==================================================== diff -ur plplot-5.9.8.orig//drivers/wxwidgets.cpp plplot-5.9.8//drivers/wxwidgets.cpp --- plplot-5.9.8.orig//drivers/wxwidgets.cpp 2011-08-01 23:29:39.000000000 +0530 +++ plplot-5.9.8//drivers/wxwidgets.cpp 2011-08-02 01:06:57.323000001 +0530 @@ -231,7 +231,7 @@ if ( ucs4[i] != (PLUNICODE) plplotEsc ) // a character to display { ucs4_to_utf8( ucs4[i], utf8 ); - strncat( utf8_string, utf8, max_string_length ); + strncat( utf8_string, utf8, sizeof(utf8_string)-strlen(utf8_string)-1 ); i++; continue; } @@ -239,7 +239,7 @@ if ( ucs4[i] == (PLUNICODE) plplotEsc ) // a escape character to display { ucs4_to_utf8( ucs4[i], utf8 ); - strncat( utf8_string, utf8, max_string_length ); + strncat( utf8_string, utf8, sizeof(utf8_string)-strlen(utf8_string)-1); i++; continue; } ==================================================== After the building is done, I tested the package by running the plplot_test.sh script followed by test_diff.sh test for lua and python. The result is perfect, because the test reports no difference between the psc plots obtained with c/cpp and those obtained with lua 5.2. This is what the result says (I understand that the x00 example which was missing from lua/python previously is now also available for these two bindings): ============================================ python Missing examples : Differing postscript output : Missing stdout : Differing stdout : lua Missing examples : Differing postscript output : Missing stdout : Differing stdout : ============================================ I can confirm the same result by manual inspection of the psc output files, especially example 21 which was giving us problems earlier but now looks exactly the same whether generated by a c/cpp code or by lua. I believe we can now treat plplot at the current svn revision to be perfectly compatible with lua 5.2 as well. Thanks a bunch for all of your help with the tests, building etc. and for fixing everything too. There is an unrelated problem about the GNAT library not being detected by the build system, but I will report that in a separate mail. Please let me know if you think any more tests could help with the lua 5.2 issue. Thanks a lot and bye. -- Atri [1] The warnings without this patch says:- I: Statement might be overflowing a buffer in strncat. Common mistake: BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1) E: plplot bufferoverflowstrncat /home/abuild/rpmbuild/BUILD/plplot/drivers/wxwidgets.cpp:253:64 E: plplot bufferoverflowstrncat /home/abuild/rpmbuild/BUILD/plplot/drivers/wxwidgets.cpp:261:64 |