When a process calls exit(), the exit_handler trigger
__do_global_dtor_aux then calls TraceLog destructor.
One of process thread is calling TraceLog::Log while
the destructor is called. This leads to a coredump.
The process (which could by any applications) calling
exit() first is responsible to
Summary: base: Place TraceLog instance on heap memory V3 [#2860]
Review request for Ticket(s): 2860
Peer Reviewer(s): Hans, Anders, Ravi
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2860
Base revision:
Hi Hans
Ack
Thanks
Gary
On 16/5/18, 5:27 pm, "Hans Nordeback" wrote:
---
src/base/daemon.c | 52 ++---
tools/cluster_sim_uml/build_uml | 1 +
2 files changed, 49 insertions(+), 4 deletions(-)
Hi Hans,
Place it on heap so destructor won't be called as part of
__do_global_dtor_aux I guess, it should be equivalent to the previous of
TraceLog regarding this issue.
I think you can make "if (mutex_ && mutext_->good())", it can pass the
check mutex_ against null but not sure after
Hi Minh,
yes gl_trace/gl_log can be put on the heap, you mean without any owner?
But in this case when destructors for one of the threads has been run
other threads
should notice that some states may not be valid anymore, e.g. that
mutex_->good() returns false, but if mutex_ has been