OS X: ++ ++ update conflicts between static and dynamic related versions & # 8594; EXC_BAD_ACCESS

I have an OS X package that statically links the regex boost + library. This package is loaded into the host application, which itself downloads dylib, which contains a different version of boost ++ regex.

When I try to create a regex in my package:

regex expr(exprString, icase); 

I get a failure:

Exception Type: EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: EXC_I386_GPFLT

The call stack shows that my package is trying to call boost :: re_detail :: basic_regex_parser not from the static linked version of boost of my package, but from the accelerated version of the host application.

Call stack:

 0 libProToolsInterplayOption.dylib 0x0000000114c06c9f boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse_extended() + 15 1 com.my_bundle.AAX 0x0000000125f802af boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse(char const*, char const*, unsigned int) + 575 2 com.my_bundle.AAX 0x0000000125f6f412 boost::re_detail::basic_regex_implementation<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int) + 130 3 com.my_bundle.AAX 0x0000000125f6f217 boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int) + 487 4 com.my_bundle.AAX 0x0000000125dd027b boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int) + 43 (basic_regex.hpp:380) 5 com.my_bundle.AAX 0x0000000125dd0243 boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >& boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign<std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) + 99 (basic_regex.hpp:418) 6 com.my_bundle.AAX 0x0000000125dd0173 boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::basic_regex<std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) + 51 (basic_regex.hpp:393) 7 com.my_bundle.AAX 0x0000000125dce783 boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::basic_regex<std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) + 35 (basic_regex.hpp:394) 

This gives EXC_BAD_ACCESS.

How can I make sure that my package uses only the statically linked version of boost for all function calls?

Note. I have no control if the host application downloading my package uses boost or the upgrade version it downloads.

Any help appreciated. Thanks

+5
source share

All Articles