From a339c989c7bb65677c1544d613e65699030f9466 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 20 Feb 2006 02:04:31 +0000 Subject: * exceptions.cc (stackdump): Avoid dumping more than once. --- winsup/cygwin/exceptions.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/exceptions.cc') diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 3f2c13c88..cce217e87 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -262,13 +262,16 @@ static void stackdump (DWORD ebp, int open_file, bool isexception) { extern unsigned long rlim_core; + static bool already_dumped; - if (rlim_core == 0UL) + if (rlim_core == 0UL || (open_file && already_dumped)) return; if (open_file) open_stackdumpfile (); + already_dumped = true; + int i; thestack.init (ebp, 1, !isexception); /* Initialize from the input CONTEXT */ -- cgit v1.2.3