public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/ibuclaw/heads/darwin)] Darwin D : Disable backtraces for Darwin for now.
Date: Sun, 14 Mar 2021 22:02:12 +0000 (GMT)	[thread overview]
Message-ID: <20210314220212.99BC8386F46E@sourceware.org> (raw)

https://gcc.gnu.org/g:8b8e2290073c24bc6897f4d82abb6edad32cf506

commit 8b8e2290073c24bc6897f4d82abb6edad32cf506
Author: Iain Sandoe <iain@sandoe.co.uk>
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 848b607ae69..508cc0fc563 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");
@@ -497,6 +500,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;
@@ -521,11 +525,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;


             reply	other threads:[~2021-03-14 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 22:02 Iain Buclaw [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-17 14:35 Iain Buclaw
2021-04-19 18:07 Iain Buclaw
2021-04-10 17:02 Iain Buclaw
2021-04-10 15:05 Iain Buclaw
2021-03-07 17:03 Iain Buclaw
2021-01-30 19:10 Iain Buclaw
2021-01-28 17:33 Iain Buclaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210314220212.99BC8386F46E@sourceware.org \
    --to=ibuclaw@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).