Andreas wrote:
Hello,
I found a bug in the Cygwin environment that blocks me. I condensed the
problem into one C++ file: all.cc
I compiles OK, but crashes, when executed.
I compiled the same file on a LINUX system, it runs there without a problem.
To me it seems that the deallocation in the destructor fails, when the
object has a vector<bool> element.
Please do:
g++ -Wall -g -o all.exe all.cc
all.exe
and see if you can reproduce.
My output is:
3 [main] all 2144 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
1559 [main] all 2144 open_stackdumpfile: Dumping stack trace to
all.exe.stackdump
Ok, after another look I saw that your mailer wrapped the code,
maybe you should change your mailer?
$ ./all.C.exe
TR> all.C : 262 | int main(int, char**)
TR> all.C : 255 | void My::main_body(int, char**)
TR> all.C : 225 | My::CG_Args::CG_Args(int, char**)
TR> all.C : 152 | My::UT_Args::UT_Args(int, char**)
TR> all.C : 145 | My::UT_Args::iArgs::iArgs()
TR< My::UT_Args::iArgs::iArgs() ENDED.
TR> all.C : 168 | void My::UT_Args::iArgs::process()
TR> all.C : 105 | void My::Idx_Name::add(std::string)
TR< void My::Idx_Name::add(std::string) ENDED.
TR> all.C : 63 | void My::Name_Idx::add(std::string, int)
TR< void My::Name_Idx::add(std::string, int) ENDED.
TR< void My::UT_Args::iArgs::process() ENDED.
TR< My::UT_Args::UT_Args(int, char**) ENDED.
TR> all.C : 197 | void My::UT_Args::print(std::string)
TR> all.C : 80 | void My::Name_Idx::print(std::string)
NameIdx contents:
0: ./all.C -> 0
TR< void My::Name_Idx::print(std::string) ENDED.
TR> all.C : 115 | void My::Idx_Name::print(std::string)
IdxName contents:
0: ./all.C
TR< void My::Idx_Name::print(std::string) ENDED.
TR< void My::UT_Args::print(std::string) ENDED.
TR> all.C : 177 | int My::UT_Args::getIdx(std::string)
TR> all.C : 68 | int My::Name_Idx::getIdx(std::string)
TR< int My::Name_Idx::getIdx(std::string) ENDED.
TR< int My::UT_Args::getIdx(std::string) ENDED.
TR> all.C : 177 | int My::UT_Args::getIdx(std::string)
TR> all.C : 68 | int My::Name_Idx::getIdx(std::string)
TR< int My::Name_Idx::getIdx(std::string) ENDED.
TR< int My::UT_Args::getIdx(std::string) ENDED.
TR> all.C : 177 | int My::UT_Args::getIdx(std::string)
TR> all.C : 68 | int My::Name_Idx::getIdx(std::string)
TR< int My::Name_Idx::getIdx(std::string) ENDED.
TR< int My::UT_Args::getIdx(std::string) ENDED.
TR> all.C : 204 | void My::UT_Args::getUnchecked()
TR< void My::UT_Args::getUnchecked() ENDED.
TR> all.C : 161 | My::UT_Args::~UT_Args()
Mark before
TR> all.C : 147 | My::UT_Args::iArgs::~iArgs()
TR< My::UT_Args::iArgs::~iArgs() ENDED.
Segmentation fault (core dumped)
Core dumps here too. If I do as Brian suggested all is fine:
int UT_Args::getIdx(string name) {
Tracer tr(__FILE__,__LINE__,__PRETTY_FUNCTION__,true);
int idx = p->nameIdx.getIdx(name);
if (idx == -1) {
p->checked[idx]=false;
} else {
p->checked[idx]=true;
}
return idx;
}
Gerrit
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/