From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1698) id 9BB77385781A; Fri, 15 Oct 2021 19:34:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BB77385781A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Iain D Sandoe To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/iains/heads/d-for-darwin)] Darwin D : Disable backtraces for Darwin for now. X-Act-Checkin: gcc X-Git-Author: Iain Sandoe X-Git-Refname: refs/users/iains/heads/d-for-darwin X-Git-Oldrev: 0e4faf48dd4344b453275887e6fd2e97aee11d3b X-Git-Newrev: 0c9d8f06f80a08a4ed7c757861a60bec3db1e36e Message-Id: <20211015193441.9BB77385781A@sourceware.org> Date: Fri, 15 Oct 2021 19:34:41 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2021 19:34:41 -0000 https://gcc.gnu.org/g:0c9d8f06f80a08a4ed7c757861a60bec3db1e36e commit 0c9d8f06f80a08a4ed7c757861a60bec3db1e36e Author: Iain Sandoe Date: Sat Dec 19 13:21:46 2020 +0000 Darwin D : Disable backtraces for Darwin for now. It seems that there is some fault in the handling of these that causes the process to spin if the backtrace is attempted in most cases. Diff: --- libphobos/libdruntime/core/runtime.d | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libphobos/libdruntime/core/runtime.d b/libphobos/libdruntime/core/runtime.d index 5fc99046d23..77b8f466566 100644 --- a/libphobos/libdruntime/core/runtime.d +++ b/libphobos/libdruntime/core/runtime.d @@ -479,6 +479,9 @@ extern (C) bool runModuleUnitTests() static extern (C) void unittestSegvHandler( int signum, siginfo_t* info, void* ptr ) { + version(Darwin) {} + else + { import core.stdc.stdio; fprintf(stderr, "Segmentation fault while running unittests:\n"); fprintf(stderr, "----------------\n"); @@ -489,6 +492,7 @@ extern (C) bool runModuleUnitTests() foreach (size_t i, const(char[]) msg; bt) fprintf(stderr, "%s\n", msg.ptr ? msg.ptr : "???"); + } } sigaction_t action = void; @@ -513,11 +517,15 @@ extern (C) bool runModuleUnitTests() static extern (C) void unittestSegvHandler( int signum, siginfo_t* info, void* ptr ) nothrow { + version(Darwin) {} + else + { static enum MAXFRAMES = 128; void*[MAXFRAMES] callstack; auto numframes = backtrace( callstack.ptr, MAXFRAMES ); backtrace_symbols_fd( callstack.ptr, numframes, 2 ); + } } sigaction_t action = void;