Boost C++ Libraries: Ticket #5153: Behavior difference of 32-bit and 64-bit libraries https://svn.boost.org/trac10/ticket/5153 <p> Hi, </p> <p> I have built the 32-bit and 64-bit versions of the Boost libraries on Solaris 10 x86. I specified the following options when I built the libraries: </p> <blockquote> <p> runtime-link=shared </p> </blockquote> <blockquote> <p> link=shared </p> </blockquote> <p> Now, I'm trying to experiment with the libraries and I'm observing some inconsistency. </p> <p> I wrote the program test_space.cpp to display the space information about the current filesystem using version 3 of the Boost filesystem library. </p> <p> When I run the 32-bit version of test_space.cpp, I get the following results: </p> <blockquote> <p> capacity = 33666173952 </p> </blockquote> <blockquote> <p> free = 0 </p> </blockquote> <blockquote> <p> available = 33410671616 </p> </blockquote> <p> When I run the 64-bit version of test_space.cpp, I get the following results: </p> <blockquote> <p> capacity = 33666173952 </p> </blockquote> <blockquote> <p> free = 33410000896 </p> </blockquote> <blockquote> <p> available = 33073339392 </p> </blockquote> <p> Based on the above results, it seems that the 32-bit version is not behaving correctly. Am I missing something here? </p> <p> Here's another observation I have. I wrote another program test_direntry.cpp to display the file type of three paths again using version 3 of the Boost filesystem library. </p> <p> When I run the 32-bit version of test_direntry.cpp, I get the following results: </p> <blockquote> <p> An unknown path: </p> </blockquote> <blockquote> <blockquote> <p> dummy status is file not found </p> </blockquote> </blockquote> <blockquote> <p> A file path: </p> </blockquote> <blockquote> <blockquote> <p> bin-soli32/test_direntry status is type unknown </p> </blockquote> </blockquote> <blockquote> <p> A directory path: </p> </blockquote> <blockquote> <blockquote> <p> /home/Leo/Devel/projects/compiler_tests/test_direntry status is type unknown </p> </blockquote> </blockquote> <p> When I run the 64-bit version of test_direntry.cpp, I get the following results: </p> <blockquote> <p> An unknown path: </p> </blockquote> <blockquote> <blockquote> <p> dummy status is file not found </p> </blockquote> </blockquote> <blockquote> <p> A file path: </p> </blockquote> <blockquote> <blockquote> <p> bin-soli64/test_direntry status is regular file </p> </blockquote> </blockquote> <blockquote> <p> A directory path: </p> </blockquote> <blockquote> <blockquote> <p> /home/Leo/Devel/projects/compiler_tests/test_direntry status is directory file </p> </blockquote> </blockquote> <p> It appears from the above results that the 32-bit version of test_direntry.cpp isn't behaving correctly. Do you have an idea what I could have done wrong or is this a bug in the library? </p> <p> Regards, Leo </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5153 Trac 1.4.3 lcarreon@… Wed, 02 Feb 2011 22:35:43 GMT attachment set https://svn.boost.org/trac10/ticket/5153 https://svn.boost.org/trac10/ticket/5153 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_space.cpp</span> </li> </ul> Ticket lcarreon@… Wed, 02 Feb 2011 22:36:11 GMT attachment set https://svn.boost.org/trac10/ticket/5153 https://svn.boost.org/trac10/ticket/5153 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_direntry.cpp</span> </li> </ul> Ticket lcarreon@… Thu, 03 Feb 2011 23:21:30 GMT <link>https://svn.boost.org/trac10/ticket/5153#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:1</guid> <description> <p> Additionally, when I re-run the 32-bit version of test_space.cpp it core dumps. According to the Sun Studio 12.2 IDE debugger, the core dump is occuring on lines 431-432 of the file boost/filesystem/v3/operations.hpp. These two lines contain the following: </p> <blockquote> <p> inline space_info space(const path&amp; p) {return detail::space(p);} </p> </blockquote> </description> <category>Ticket</category> </item> <item> <author>lcarreon@…</author> <pubDate>Thu, 03 Feb 2011 23:23:07 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5153 https://svn.boost.org/trac10/ticket/5153 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_diriterator.cpp</span> </li> </ul> Ticket lcarreon@… Thu, 03 Feb 2011 23:35:54 GMT <link>https://svn.boost.org/trac10/ticket/5153#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:2</guid> <description> <p> Another inconsistency that I discovered is the behavior of the directory_iterator class. </p> <p> I have attached test_diriterator.cpp which is the test program I used and discovered this inconsistency. </p> <p> When I run the 32-bit version of test_diriterator.cpp, I get the following result (spacing added): </p> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel" </p> </blockquote> <blockquote> <p> "/home/Leo" </p> </blockquote> <blockquote> <p> "/home" </p> </blockquote> <blockquote> <p> "/" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <blockquote> <p> "" </p> </blockquote> <p> When I run the 64-bit version of test_diriterator.cpp, I get the following result (spacing added): </p> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/Makefile.mak" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_builtins" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_direntry" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_diriterator" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_errorcode" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_locales" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_mktime" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_path" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_rdiriterator" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_space" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_statvfs" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_typeid" </p> </blockquote> <blockquote> <p> "/home/Leo/Devel/projects/compiler_tests/test_tzset" </p> </blockquote> <p> It appears that the 32-bit version is displaying the result of path.remove_filename() instead. Would appreciate your comments. </p> </description> <category>Ticket</category> </item> <item> <author>lcarreon@…</author> <pubDate>Tue, 08 Feb 2011 22:08:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:3</guid> <description> <p> I have figured out the cause of the problems stated above. It is the line <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/35" title="#35: Bugs: Self division wrong in template rational (closed: Fixed)">#35</a> of the file boost_1_45_0/libs/filesystem/v3/src/operations.cpp. This line contains the following: </p> <p> #define _FILE_OFFSET_BITS 64 <em> at worst, these defines may have no effect, </em></p> <p> If the intention of this line is to support large files (files greater than 2GB in size), the recommended alternative according to Solaris documentation is to define _LARGEFILE64_SOURCE. This compiler option switches file support from 32-bit to 64-bit on a 32-bit environment. </p> <p> For the moment, I simply commented out the line for my 32-bit Solaris x86 build. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Mon, 14 Feb 2011 22:18:39 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:4</guid> <description> <p> I'm going to need to see the output config_info for both your 32-bit and 64-bit environments. You will need to run something like this: </p> <blockquote> <p> cd boost-root/libs/config/test bjam config_info </p> </blockquote> <p> If bjam isn't in your path, you will need to specify its directory. </p> <p> bjam should produce a file named config_info.output, probably in boost-root/bin.v2/libs/config/test/config_info.test/sun/debug/stdlib-sun-stlport. That path will vary accordingly if you are using a different standard library or a different compiler. </p> <p> More information is needed about the configuration to figure out what the #if's should look like for Solaris. We don't want to break configurations like the Sandia test machine, when the large file test already passes. </p> <p> Thanks, </p> <p> --Beman </p> </description> <category>Ticket</category> </item> <item> <author>lcarreon@…</author> <pubDate>Mon, 28 Feb 2011 01:59:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:5</guid> <description> <p> Hi, </p> <p> I'm on an overseas trip at the moment. I will supply the info that you requested as soon as I get back home. </p> <p> Regards, </p> <p> Leo </p> </description> <category>Ticket</category> </item> <item> <author>lcarreon@…</author> <pubDate>Tue, 15 Mar 2011 07:56:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:6</guid> <description> <p> Hi, </p> <p> I'm attaching the two files that you requested. </p> <p> Regards, Leo </p> </description> <category>Ticket</category> </item> <item> <author>lcarreon@…</author> <pubDate>Tue, 15 Mar 2011 08:05:33 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/5153 https://svn.boost.org/trac10/ticket/5153 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">Temp.zip</span> </li> </ul> <p> ZIP file that contains the config_info.output for 32/64-bit Solaris x86 </p> Ticket Leo Carreon <lcarreon@…> Tue, 17 May 2011 22:28:44 GMT <link>https://svn.boost.org/trac10/ticket/5153#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:7</guid> <description> <p> Hi, </p> <p> Just wanted to find out if the information that I supplied was of any help? </p> <p> Regards, </p> <p> Leo </p> </description> <category>Ticket</category> </item> <item> <author>willchido@…</author> <pubDate>Sun, 21 Aug 2011 16:56:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:8</guid> <description> <p> Hello, I have been seriously affected by this bug as well. I would like to report that it appears fixed in 1.47. Apparently, the changes made to fix QNX for that release also fixed Solaris. </p> <p> May I please wonder aloud how on Earth the filesystem bugs for QNX get addressed before the Solaris ones? </p> </description> <category>Ticket</category> </item> <item> <author>Leo Carreon <lcarreon@…></author> <pubDate>Sun, 18 Dec 2011 00:33:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5153#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5153#comment:9</guid> <description> <p> Hi, </p> <p> It appears that this problem has been fixed in Boost 1.47.0 thus this ticket may be closed. </p> <p> Kind regards, Leo </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Mon, 05 Jan 2015 16:29:39 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5153#comment:10 https://svn.boost.org/trac10/ticket/5153#comment:10 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <ol class="upperalpha" start="17"><li>May I please wonder aloud how on Earth the filesystem bugs for QNX get addressed before the Solaris ones? </li></ol><ol class="upperalpha"><li>Someone bothers to run public regression tests for QNX. No one bothers for Solaris. See <a href="http://www.boost.org/development/tests/develop/developer/summary.html">http://www.boost.org/development/tests/develop/developer/summary.html</a> </li></ol><p> Likewise, QNX patches get contributed occasionally, but this is rare for Solaris. </p> <p> Anyhow, the reported problems have been fixed so the issue is being closed. </p> <p> Thanks, </p> <p> --Beman </p> Ticket