[program_options] Need help with remaining fails

The current test results: http://tinyurl.com/4ghk7 show just three failures which I'd like to fix other than by marking them expected. Those are options_description_test_dll, on msvc and intel7-vc6, and variable_map_test_dll, on intel7-vc6. They all fail at runtime with memory access violation. Since I don't have vc6, I'd appreciate if someone could look at the failures in a debugger. This is probably some bug in vc6 library, so I hope a single fix will suffice. Thanks in advance, Volodya

I decided to look at the CW8 results, and saw that you marked the unicode_test as an expected fail. So I thought I'd see if it could be fixed. The first thing I did was to see why it was giving the warning: ### mwcc Compiler: # In: ..\boost\program_options\detail\utf8_codecvt_facet.hpp # From: ..\libs\program_options\test\unicode_test.cpp # ------------------------------------------------------ # 155: }; # Warning: ^ # 'boost::program_options::detail::utf8_codecvt_facet_wchar_t::do_length(const int &, const char *, const char *, unsigned int) const' hides inherited virtual function 'std::codecvt<wchar_t, char, int>::do_length(int &, const char *, const char *, unsigned int) const' As it turns out, this is a valid warning. It's an error in the implementation. Specifically, as stated in 22.2.1.5 the signature for do_length is: virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const; This doesn't fix the failure, but I thought you'd like to know. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Hi Rene,
### mwcc Compiler: # In: ..\boost\program_options\detail\utf8_codecvt_facet.hpp # From: ..\libs\program_options\test\unicode_test.cpp # ------------------------------------------------------ # 155: }; # Warning: ^ #
'boost::program_options::detail::utf8_codecvt_facet_wchar_t::do_length(const
int &, const char *, const char *, unsigned int) const' hides inherited virtual function 'std::codecvt<wchar_t, char, int>::do_length(int &, const char *, const char *, unsigned int) const'
As it turns out, this is a valid warning.
Yes, you're right. I've fixed it. Actually, I start to wonder if Boost should have -Woverloaded-virtual added to gcc flags.
virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const;
This doesn't fix the failure,
Yea, I don't think this function is ever called.
but I thought you'd like to know.
Sure, thanks! - Volodya

Vladimir Prus <ghost@cs.msu.su> writes:
Hi Rene,
### mwcc Compiler: # In: ..\boost\program_options\detail\utf8_codecvt_facet.hpp # From: ..\libs\program_options\test\unicode_test.cpp # ------------------------------------------------------ # 155: }; # Warning: ^ #
'boost::program_options::detail::utf8_codecvt_facet_wchar_t::do_length(const
int &, const char *, const char *, unsigned int) const' hides inherited virtual function 'std::codecvt<wchar_t, char, int>::do_length(int &, const char *, const char *, unsigned int) const'
As it turns out, this is a valid warning.
Yes, you're right. I've fixed it. Actually, I start to wonder if Boost should have -Woverloaded-virtual added to gcc flags.
virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const;
This doesn't fix the failure,
Yea, I don't think this function is ever called.
That's a problem in itself; regression tests should achieve coverage. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

Vladimir Prus ha escrito:
The current test results:
show just three failures which I'd like to fix other than by marking them expected. Those are options_description_test_dll, on msvc and intel7-vc6, and variable_map_test_dll, on intel7-vc6. They all fail at runtime with memory access violation.
Since I don't have vc6, I'd appreciate if someone could look at the failures in a debugger. This is probably some bug in vc6 library, so I hope a single fix will suffice.
Hi Volodya, I've reproduced the crash with options_description_test_dll and found the cause. The problem has to do with a bug in Dinkumware stdlib (as shipped with VC++ 6.0, so it also affetcs Intel 7.1) by which one cannot share std::sets across DLLs. This impacts the methods options_description::keys(), options_description::primary_keys() and options_description::approximations(). I've tried forcing the inlining of these member functions, to not avail. Dinkumware folks posted a patch for this problem that you can read about here: http://www.dinkumware.com/vc_fixes.html Replacing the internal header <xtree> with the one available at the page solves the problem, I've just checked this out. So, my suggestion is that you mark this test as expected failure in MSVC and Intel and add an explanatory note with this info so that the user can apply the Dinkumware patch, if she wishes to do so. HTH Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Hi Joaqu?n,
Hi Volodya, I've reproduced the crash with options_description_test_dll and found the cause.
The problem has to do with a bug in Dinkumware stdlib (as shipped with VC++ 6.0, so it also affetcs Intel 7.1) by which one cannot share std::sets across DLLs. This impacts the methods options_description::keys(), options_description::primary_keys() and options_description::approximations().
Oh, so if DLL create std::set and passes it to application, the application crashes? Sweet ;-)
I've tried forcing the inlining of these member functions, to not avail.
Dinkumware folks posted a patch for this problem that you can read about here:
http://www.dinkumware.com/vc_fixes.html
Replacing the internal header <xtree> with the one available at the page solves the problem, I've just checked this out. So, my suggestion is that you mark this test as expected failure in MSVC and Intel and add an explanatory note with this info so that the user can apply the Dinkumware patch, if she wishes to do so.
Big thanks for diagnosing this. That's what I'll do now. - Volodya
participants (4)
-
David Abrahams
-
Joaquín Mª López Muñoz
-
Rene Rivera
-
Vladimir Prus