You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ g++ -Wall -Wextra -fmodules-ts -g main.cxx
$ ./a.out
[1] 60926 segmentation fault (core dumped) ./a.out
# Run with GDB:
(gdb) r
Starting program: /home/chihhao-su/Proj/json_import_to_influxdb/a.out
This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::_Alloc_hider::_Alloc_hider (this=0x7ffff7b27e22 <_int_malloc+3682>, __dat=0x7ffff7b27e32 <_int_malloc+3698>"\377H\215\rf\334\025", __a=...) at /usr/src/debug/gcc-11.3.1-2.fc35.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/ext/new_allocator.h:82
82 new_allocator(const new_allocator&) _GLIBCXX_USE_NOEXCEPT { }
(gdb) bt
#0 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider::_Alloc_hider (this=0x7ffff7b27e22 <_int_malloc+3682>,
__dat=0x7ffff7b27e32 <_int_malloc+3698>"\377H\215\rf\334\025", __a=...)
at /usr/src/debug/gcc-11.3.1-2.fc35.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/ext/new_allocator.h:82
#1 0x000000000040150a in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<std::allocator<char> > (
this=0x7fffffffddf0, __s=0x40203a "asdfasdf", __a=...)
at /usr/include/c++/11/bits/basic_string.h:534
#2 0x0000000000401280 in main () at main.cxx:6
(gdb)
I suspected it might be some limitations(or bugs) in GCC which doesn't allow users to include a c++ header(e.g. use a header-only-third-party library) that uses the header-file-version of c++ standard library when enable option "-fmodules-ts". But I wrote a simple .hpp file including a class, which uses std::string that in header-file-version of c++ standard library:
And I try to include both of it and "string" in main.cxx, it can still compile and run sucessfully. I'm wondering if it's some thing with influxdb-cpp.
The text was updated successfully, but these errors were encountered:
It's weird, I cannot figure out why.
Situation
Minimal code example
I suspected it might be some limitations(or bugs) in GCC which doesn't allow users to include a c++ header(e.g. use a header-only-third-party library) that uses the header-file-version of c++ standard library when enable option "-fmodules-ts". But I wrote a simple .hpp file including a class, which uses std::string that in header-file-version of c++ standard library:
And I try to include both of it and "string" in main.cxx, it can still compile and run sucessfully. I'm wondering if it's some thing with influxdb-cpp.
The text was updated successfully, but these errors were encountered: