Closed
Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware: Esp8266
- Core Version: latest
- Development Env: Make
- Operating System: Arch
Settings in IDE
- Module: Nodemcu
- Flash Mode: qio
- Flash Size: 4MB
- lwip Variant: v1.4
- Reset Method: nodemcu
- Flash Frequency: 40Mhz
- CPU Frequency: 80Mhz
- Upload Using: SERIAL
- Upload Speed: 115200
Problem Description
Trying to instantiate a stringstream yields a segmentation fault. I've been trying to debug it with the GDBStub, but I'm stuck.
MCVE Sketch
#include <Arduino.h>
#include <GDBStub.h>
#include <string>
#include <sstream>
void setup() {
Serial.begin(115200);
gdbstub_init();
}
bool debug_stop = true;
void loop() {
Serial.println("Running");
delay(100);
// set debug_stop = false from GDB in order to continue
if (debug_stop == true) return;
std::stringstream ss("hello");
}
Debug Messages
The seg fault:
Program received signal SIGSEGV, Segmentation fault.
0x40235268 in std::type_info::operator== (__arg=...,
this=0x402695c4 <typeinfo for std::ctype<char>>)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/typeinfo:123
123 ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/typeinfo: No such file or directory.
The back trace:
(gdb) bt
#0 0x4023659c in std::type_info::operator== (__arg=...,
this=0x40269c40 <typeinfo for std::ctype<char>>)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/typeinfo:123
#1 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__contained_public,
dst_type=0x40269c40 <typeinfo for std::ctype<char>>,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x40269144 <typeinfo for std::locale::facet>,
src_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#2 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x3fff0be0 <std::cout+4>,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x3fff0bdc <std::cout>,
src_ptr=0x3fff0868 <__gnu_internal::buf_cout_sync>, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#3 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1073645236,
dst_type=0x3ffffa20, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x3ffffa30, src_ptr=0x190001, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#4 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1073666608,
dst_type=0x3ffffaa0, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=
0x40202215 <init_done()+29>, src_ptr=0xffffe6fc, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#5 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1946157057,
dst_type=0x66336a4a, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x7a686a76, src_ptr=0xdfbd4764, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#6 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=944788293,
dst_type=0x5f363632, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x324f43, src_ptr=0x3fff2a30, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#7 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=511,
dst_type=0xffffff04, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffff0001, src_ptr=0x3fff0358 <g_cont+4008>, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#8 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0xffffffff, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#9 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
--Type <RET> for more, q to quit, c to continue without paging--
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0xffffffff, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#10 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0xffffffff, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#11 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0xffffffff, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#12 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0x36b8f604, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#13 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4294967295,
dst_type=0xffffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xffffffff, src_ptr=0xffffffff, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#14 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=32,
dst_type=0x20, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x90,
src_ptr=0x4010f000, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#15 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=65534,
dst_type=0x0, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0,
src_ptr=0x71490338, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#16 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1073742067,
dst_type=0x4000e328, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0,
src_ptr=0x506340, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#17 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1953546291,
dst_type=0xf0b3f641, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x21002030, src_ptr=0x0, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#18 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x0,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0, src_ptr=0x0,
result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
--Type <RET> for more, q to quit, c to continue without paging--
#19 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x0,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0, src_ptr=0x0,
result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#20 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x0,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0, src_ptr=0x0,
result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#21 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x0,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x0, src_ptr=0x0,
result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#22 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=1073743256,
dst_type=0x3fffc000, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x4000dc44, src_ptr=0x24, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#23 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=4194304,
dst_type=0xffffff, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x7ff00000, src_ptr=0xcaa1ffce, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#24 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=20537830,
dst_type=0x41091129, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xa1799169, src_ptr=0xd13022f0, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#25 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=3356416000,
dst_type=0x10ddc031, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x5610ffd0, src_ptr=0xd02022f0, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#26 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0,
access_path=__cxxabiv1::__class_type_info::__unknown, dst_type=0x61228159,
obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>, src_type=0x30122c13,
src_ptr=0xc021e800, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#27 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=723661313,
dst_type=0x452a2222, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x11080003, src_ptr=0x81d971c9, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
--Type <RET> for more, q to quit, c to continue without paging--
#28 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=13,
dst_type=0x3bd05ad, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x6c604c0c, src_ptr=0x7440fb56, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#29 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=90780555,
dst_type=0xc5521579, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0x7642708, src_ptr=0xc052a014, result=...)
at ../../../../../dl/gcc-xtensa/libstdc++-v3/libsupc++/vmi_class_type_info.cc:91
#30 0x402366a5 in __cxxabiv1::__vmi_class_type_info::__do_dyncast (
this=0x40269c40 <typeinfo for std::ctype<char>>, src2dst=0, access_path=809509632,
dst_type=0x33b014b0, obj_ptr=0x3fff1778 <(anonymous namespace)::ctype_c>,
src_type=0xac0368c0, src_ptr=0x20688055, result=...)
Metadata
Metadata
Assignees
Labels
No labels