build/unix/build-gcc/gcc-bt.patch

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 --- gcc-4.7.3/gcc/diagnostic.c	2012-02-02 15:46:06.000000000 -0500
     2 +++ gcc-patched/gcc/diagnostic.c	2013-05-23 14:07:10.756527912 -0400
     3 @@ -31,6 +31,10 @@
     4  #include "intl.h"
     5  #include "diagnostic.h"
     7 +#include <execinfo.h>
     8 +#include <unistd.h>
     9 +#include <fcntl.h>
    10 +#include <stdio.h>
    11  #define pedantic_warning_kind(DC)			\
    12    ((DC)->pedantic_errors ? DK_ERROR : DK_WARNING)
    13  #define permissive_error_kind(DC) ((DC)->permissive ? DK_WARNING : DK_ERROR)
    14 @@ -237,6 +241,11 @@
    15        if (context->abort_on_error)
    16  	real_abort ();
    18 +      {
    19 +        void *stack[100];
    20 +        int count = backtrace(stack, 100);
    21 +        backtrace_symbols_fd(stack, count, STDERR_FILENO);
    22 +      }
    23        fnotice (stderr, "Please submit a full bug report,\n"
    24  	       "with preprocessed source if appropriate.\n"
    25  	       "See %s for instructions.\n", bug_report_url);

mercurial