build/unix/build-gcc/gcc48-pr55650.patch

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 2012-12-12 Jakub Jelinek <jakub@redhat.com>
michael@0 2
michael@0 3 PR gcov-profile/55650
michael@0 4 * coverage.c (coverage_obj_init): Return false if no functions
michael@0 5 are being emitted.
michael@0 6
michael@0 7 * g++.dg/other/pr55650.C: New test.
michael@0 8 * g++.dg/other/pr55650.cc: New file.
michael@0 9
michael@0 10 --- gcc/coverage.c.jj 2012-11-19 14:41:24.000000000 +0100
michael@0 11 +++ gcc/coverage.c 2012-12-12 08:54:35.005180211 +0100
michael@0 12 @@ -999,6 +999,9 @@ coverage_obj_init (void)
michael@0 13 /* The function is not being emitted, remove from list. */
michael@0 14 *fn_prev = fn->next;
michael@0 15
michael@0 16 + if (functions_head == NULL)
michael@0 17 + return false;
michael@0 18 +
michael@0 19 for (ix = 0; ix != GCOV_COUNTERS; ix++)
michael@0 20 if ((1u << ix) & prg_ctr_mask)
michael@0 21 n_counters++;
michael@0 22 --- gcc/testsuite/g++.dg/other/pr55650.C.jj 2012-12-12 09:03:53.342876593 +0100
michael@0 23 +++ gcc/testsuite/g++.dg/other/pr55650.C 2012-12-12 09:03:11.000000000 +0100
michael@0 24 @@ -0,0 +1,21 @@
michael@0 25 +// PR gcov-profile/55650
michael@0 26 +// { dg-do link }
michael@0 27 +// { dg-options "-O2 -fprofile-generate" }
michael@0 28 +// { dg-additional-sources "pr55650.cc" }
michael@0 29 +
michael@0 30 +struct A
michael@0 31 +{
michael@0 32 + virtual void foo ();
michael@0 33 +};
michael@0 34 +
michael@0 35 +struct B : public A
michael@0 36 +{
michael@0 37 + B ();
michael@0 38 + void foo () {}
michael@0 39 +};
michael@0 40 +
michael@0 41 +inline A *
michael@0 42 +bar ()
michael@0 43 +{
michael@0 44 + return new B;
michael@0 45 +}
michael@0 46 --- gcc/testsuite/g++.dg/other/pr55650.cc.jj 2012-12-12 09:03:56.329858741 +0100
michael@0 47 +++ gcc/testsuite/g++.dg/other/pr55650.cc 2012-12-12 09:03:48.982900718 +0100
michael@0 48 @@ -0,0 +1,4 @@
michael@0 49 +int
michael@0 50 +main ()
michael@0 51 +{
michael@0 52 +}

mercurial