~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/CallGraphSCCPass.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===- CallGraphSCCPass.h - Pass that operates BU on call graph -*- C++ -*-===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
//
 
10
// This file defines the CallGraphSCCPass class, which is used for passes which
 
11
// are implemented as bottom-up traversals on the call graph.  Because there may
 
12
// be cycles in the call graph, passes of this type operate on the call-graph in
 
13
// SCC order: that is, they process function bottom-up, except for recursive
 
14
// functions, which they process all at once.
 
15
//
 
16
// These passes are inherently interprocedural, and are required to keep the
 
17
// call graph up-to-date if they do anything which could modify it.
 
18
//
 
19
//===----------------------------------------------------------------------===//
 
20
 
 
21
#ifndef LLVM_CALL_GRAPH_SCC_PASS_H
 
22
#define LLVM_CALL_GRAPH_SCC_PASS_H
 
23
 
 
24
#include "llvm/Pass.h"
 
25
#include "llvm/Analysis/CallGraph.h"
 
26
 
 
27
namespace llvm {
 
28
 
 
29
class CallGraphNode;
 
30
class CallGraph;
 
31
class PMStack;
 
32
class CallGraphSCC;
 
33
  
 
34
class CallGraphSCCPass : public Pass {
 
35
public:
 
36
  explicit CallGraphSCCPass(char &pid) : Pass(PT_CallGraphSCC, pid) {}
 
37
 
 
38
  /// createPrinterPass - Get a pass that prints the Module
 
39
  /// corresponding to a CallGraph.
 
40
  Pass *createPrinterPass(raw_ostream &O, const std::string &Banner) const;
 
41
 
 
42
  /// doInitialization - This method is called before the SCC's of the program
 
43
  /// has been processed, allowing the pass to do initialization as necessary.
 
44
  virtual bool doInitialization(CallGraph &CG) {
 
45
    return false;
 
46
  }
 
47
 
 
48
  /// runOnSCC - This method should be implemented by the subclass to perform
 
49
  /// whatever action is necessary for the specified SCC.  Note that
 
50
  /// non-recursive (or only self-recursive) functions will have an SCC size of
 
51
  /// 1, where recursive portions of the call graph will have SCC size > 1.
 
52
  ///
 
53
  /// SCC passes that add or delete functions to the SCC are required to update
 
54
  /// the SCC list, otherwise stale pointers may be dereferenced.
 
55
  ///
 
56
  virtual bool runOnSCC(CallGraphSCC &SCC) = 0;
 
57
 
 
58
  /// doFinalization - This method is called after the SCC's of the program has
 
59
  /// been processed, allowing the pass to do final cleanup as necessary.
 
60
  virtual bool doFinalization(CallGraph &CG) {
 
61
    return false;
 
62
  }
 
63
 
 
64
  /// Assign pass manager to manager this pass
 
65
  virtual void assignPassManager(PMStack &PMS,
 
66
                                 PassManagerType PMT);
 
67
 
 
68
  ///  Return what kind of Pass Manager can manage this pass.
 
69
  virtual PassManagerType getPotentialPassManagerType() const {
 
70
    return PMT_CallGraphPassManager;
 
71
  }
 
72
 
 
73
  /// getAnalysisUsage - For this class, we declare that we require and preserve
 
74
  /// the call graph.  If the derived class implements this method, it should
 
75
  /// always explicitly call the implementation here.
 
76
  virtual void getAnalysisUsage(AnalysisUsage &Info) const;
 
77
};
 
78
 
 
79
/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. 
 
80
class CallGraphSCC {
 
81
  void *Context; // The CGPassManager object that is vending this.
 
82
  std::vector<CallGraphNode*> Nodes;
 
83
public:
 
84
  CallGraphSCC(void *context) : Context(context) {}
 
85
  
 
86
  void initialize(CallGraphNode*const*I, CallGraphNode*const*E) {
 
87
    Nodes.assign(I, E);
 
88
  }
 
89
  
 
90
  bool isSingular() const { return Nodes.size() == 1; }
 
91
  unsigned size() const { return Nodes.size(); }
 
92
  
 
93
  /// ReplaceNode - This informs the SCC and the pass manager that the specified
 
94
  /// Old node has been deleted, and New is to be used in its place.
 
95
  void ReplaceNode(CallGraphNode *Old, CallGraphNode *New);
 
96
  
 
97
  typedef std::vector<CallGraphNode*>::const_iterator iterator;
 
98
  iterator begin() const { return Nodes.begin(); }
 
99
  iterator end() const { return Nodes.end(); }
 
100
};
 
101
 
 
102
} // End llvm namespace
 
103
 
 
104
#endif