public
Last active

boost regex crash during startup

  • Download Gist
gdb_backtrace.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000601ad0 in strlen@@GLIBC_2.2.5 ()
(gdb) bt
#0 0x0000000000601ad0 in strlen@@GLIBC_2.2.5 ()
#1 0x00000000004012b9 in std::char_traits<char>::length (__s=0x401498 "\"http:\\\\/\\\\/localhostr.com\\\\/files\\\\/.+?\"")
at /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../include/c++/4.3.2/bits/char_traits.h:262
#2 0x00000000004012d0 in boost::cpp_regex_traits<char>::length (p=0x401498 "\"http:\\\\/\\\\/localhostr.com\\\\/files\\\\/.+?\"")
at /var/fpwork/boost/include/boost/regex/v4/cpp_regex_traits.hpp:876
#3 0x000000000040131c in boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign (this=0x7fffc48312a0,
p=0x401498 "\"http:\\\\/\\\\/localhostr.com\\\\/files\\\\/.+?\"", f=0) at /var/fpwork/boost/include/boost/regex/v4/basic_regex.hpp:364
#4 0x000000000040136e in boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::basic_regex (this=0x7fffc48312a0,
p=0x401498 "\"http:\\\\/\\\\/localhostr.com\\\\/files\\\\/.+?\"", f=0) at /var/fpwork/boost/include/boost/regex/v4/basic_regex.hpp:333
#5 0x0000000000401103 in main (argc=1, argv=0x7fffc48313a8) at /home/xwv648/test/regex/test.cpp:28
(gdb)
ldd_boost.txt
1 2 3 4 5 6 7 8
linux-vdso.so.1 => (0x00007fff21bb0000)
librt.so.1 => /lib64/librt.so.1 (0x00007f835ddfd000)
libstdc++.so.6 => /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib64/libstdc++.so.6 (0x00007f835daf5000)
libm.so.6 => /lib64/libm.so.6 (0x00007f835d870000)
libgcc_s.so.1 => /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib64/libgcc_s.so.1 (0x00007f835d65a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f835d43e000)
libc.so.6 => /lib64/libc.so.6 (0x00007f835d09c000)
/lib64/ld-linux-x86-64.so.2 (0x00000036b8c00000)
ldd_executable.txt
1 2 3 4 5 6 7 8 9
linux-vdso.so.1 => (0x00007fffb6fff000)
libboost_regex.so.1.45.0 => /var/fpwork/boost/lib/libboost_regex.so.1.45.0 (0x00007f5a3302c000)
libstdc++.so.6 => /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib64/libstdc++.so.6 (0x00007f5a32d24000)
libm.so.6 => /lib64/libm.so.6 (0x00000036ba000000)
libgcc_s.so.1 => /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib64/libgcc_s.so.1 (0x00007f5a32ad8000)
libc.so.6 => /lib64/libc.so.6 (0x00000036b9400000)
librt.so.1 => /lib64/librt.so.1 (0x00000036ba800000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036b9c00000)
/lib64/ld-linux-x86-64.so.2 (0x00000036b8c00000)
strlen_from_libstdc++.so.txt
1 2 3 4 5 6 7 8 9 10 11
readelf -s /opt/gcc/linux64/ix86/gcc_4.3.2-7p3/lib64/libstdc++.so.6 | grep strlen
50: 0000000000000000 233 FUNC GLOBAL DEFAULT UND strlen@GLIBC_2.2.5 (16)
2135: 0000000000000000 233 FUNC GLOBAL DEFAULT UND strlen@@GLIBC_2.2.5
 
readelf -s /lib64/libc-2.12.so | grep strlen
751: 00000036b947f970 61 <OS specific>: 10 GLOBAL DEFAULT 12 strlen@@GLIBC_2.2.5
1249: 00000036b947f9b0 221 FUNC LOCAL DEFAULT 12 __strlen_sse2
4282: 00000036b947f9b0 221 FUNC LOCAL DEFAULT 12 __GI_strlen
4812: 00000036b952f9d0 154 FUNC LOCAL DEFAULT 12 __strlen_sse42
4967: 00000036b954c0a0 764 FUNC LOCAL DEFAULT 12 __strlen_no_bsf
5907: 00000036b947f970 61 <OS specific>: 10 GLOBAL DEFAULT 12 strlen
test.cpp
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <cstdlib>
#include <iostream>
 
#include <boost/regex.hpp>
 
using namespace std;
 
int main(int argc, const char *argv[])
{
 
boost::regex reg("\"http:\\\\/\\\\/localhostr.com\\\\/files\\\\/.+?\"");
cout << "done!" << endl;
 
return 0;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.