tools/reorder/missing-syms.pl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rwxr-xr-x

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 #!/usr/bin/perl -w
     2 #
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this
     5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     7 #
     8 # List the missing symbols (or, do a set difference).
     9 #
    11 use 5.004;
    12 use strict;
    13 use Getopt::Long;
    15 $::opt_help = 0;
    16 $::opt_defined = "mozilla-bin.order";
    17 GetOptions("help", "defined=s");
    19 if ($::opt_help) {
    20     die "usage: missing-syms.pl --defined=<file> <symlist>";
    21 }
    23 $::Defined = { };
    25 open(DEFINED, "<$::opt_defined") || die "couldn't open defined symbol list $::opt_defined";
    26 while (<DEFINED>) {
    27     chomp;
    28     $::Defined{$_} = 1;
    29 }
    30 close(DEFINED);
    32 while (<>) {
    33     chomp;
    34     print "$_\n" unless ($::Defined{$_});
    35 }

mercurial