mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
- Update to 0.97.4
- Mark WITH_LLVM_PORTS as broken since it doesn't build with llvm 3.0 - Move LICENSE to correct place PR: ports/166160 (based on) Submitted by: scheidell@ Feature safe: yes
This commit is contained in:
parent
362462b641
commit
fdab7c3d8f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293457
@ -6,14 +6,15 @@
|
||||
#
|
||||
|
||||
PORTNAME= clamav
|
||||
PORTVERSION= 0.97.3
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 0.97.4
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
|
||||
MAINTAINER= garga@FreeBSD.org
|
||||
COMMENT= Command line virus scanner written entirely in C
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
OPTIONS= ARC "Enable arch archives support" On \
|
||||
ARJ "Enable arj archives support" On \
|
||||
LHA "Enable lha archives support" On \
|
||||
@ -34,8 +35,6 @@ USE_LDCONFIG= yes
|
||||
USE_RC_SUBR= clamav-clamd clamav-freshclam
|
||||
CLAM_CONF_FILES= clamd freshclam
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
DBDIR= /var/db/clamav
|
||||
@ -140,6 +139,10 @@ USE_ICONV= yes
|
||||
CONFIGURE_ARGS+=--without-iconv
|
||||
.endif
|
||||
|
||||
.if defined(WITH_LLVM_PORTS)
|
||||
BROKEN= Does not build with LLVM 3.0
|
||||
.endif
|
||||
|
||||
.if (defined(WITH_LLVM) || defined(WITH_LLVM_PORTS)) && ( ${ARCH} == "i386" || ${ARCH} == "amd64" )
|
||||
CONFIGURE_ARGS+=--enable-llvm
|
||||
USE_GMAKE= yes
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (clamav-0.97.3.tar.gz) = 3a8cece5b7e6b15410f6b8f96ff5591b2c5a72f290ee8a28fefda44cb5ae7aba
|
||||
SIZE (clamav-0.97.3.tar.gz) = 45793398
|
||||
SHA256 (clamav-0.97.4.tar.gz) = 958dd09c9da9ceb50c9e556b3ced9cbdf40e836d2bdc98286ce96e84fd4a5a53
|
||||
SIZE (clamav-0.97.4.tar.gz) = 48386114
|
||||
|
@ -1,135 +0,0 @@
|
||||
--- libclamav/c++/PointerTracking.h.orig 2011-10-18 09:54:10.000000000 -0200
|
||||
+++ libclamav/c++/PointerTracking.h 2011-10-18 09:53:59.000000000 -0200
|
||||
@@ -0,0 +1,132 @@
|
||||
+//===- PointerTracking.h - Pointer Bounds Tracking --------------*- C++ -*-===//
|
||||
+//
|
||||
+// The LLVM Compiler Infrastructure
|
||||
+//
|
||||
+// This file is distributed under the University of Illinois Open Source
|
||||
+// License. See LICENSE.TXT for details.
|
||||
+//
|
||||
+//===----------------------------------------------------------------------===//
|
||||
+//
|
||||
+// This file implements tracking of pointer bounds.
|
||||
+// It knows that the libc functions "calloc" and "realloc" allocate memory, thus
|
||||
+// you should avoid using this pass if they mean something else for your
|
||||
+// language.
|
||||
+//
|
||||
+// All methods assume that the pointer is not NULL, if it is then the returned
|
||||
+// allocation size is wrong, and the result from checkLimits is wrong too.
|
||||
+// It also assumes that pointers are valid, and that it is not analyzing a
|
||||
+// use-after-free scenario.
|
||||
+// Due to these limitations the "size" returned by these methods should be
|
||||
+// considered as either 0 or the returned size.
|
||||
+//
|
||||
+// Another analysis pass should be used to find use-after-free/NULL dereference
|
||||
+// bugs.
|
||||
+//
|
||||
+//===----------------------------------------------------------------------===//
|
||||
+
|
||||
+#ifndef LLVM_ANALYSIS_POINTERTRACKING_H
|
||||
+#define LLVM_ANALYSIS_POINTERTRACKING_H
|
||||
+
|
||||
+#include "llvm/ADT/SmallPtrSet.h"
|
||||
+#include "llvm/Analysis/Dominators.h"
|
||||
+#include "llvm/Instructions.h"
|
||||
+#include "llvm/Pass.h"
|
||||
+#include "llvm/Support/PredIteratorCache.h"
|
||||
+
|
||||
+namespace llvm {
|
||||
+ class DominatorTree;
|
||||
+ class ScalarEvolution;
|
||||
+ class SCEV;
|
||||
+ class Loop;
|
||||
+ class LoopInfo;
|
||||
+ class TargetData;
|
||||
+
|
||||
+ // Result from solver, assuming pointer is not NULL,
|
||||
+ // and it is not a use-after-free situation.
|
||||
+ enum SolverResult {
|
||||
+ AlwaysFalse,// always false with above constraints
|
||||
+ AlwaysTrue,// always true with above constraints
|
||||
+ Unknown // it can sometimes be true, sometimes false, or it is undecided
|
||||
+ };
|
||||
+
|
||||
+ class PointerTracking : public FunctionPass {
|
||||
+ public:
|
||||
+ typedef ICmpInst::Predicate Predicate;
|
||||
+ static char ID;
|
||||
+ PointerTracking();
|
||||
+
|
||||
+ virtual bool doInitialization(Module &M);
|
||||
+
|
||||
+ // If this pointer directly points to an allocation, return
|
||||
+ // the number of elements of type Ty allocated.
|
||||
+ // Otherwise return CouldNotCompute.
|
||||
+ // Since allocations can fail by returning NULL, the real element count
|
||||
+ // for every allocation is either 0 or the value returned by this function.
|
||||
+ const SCEV *getAllocationElementCount(Value *P) const;
|
||||
+
|
||||
+ // Same as getAllocationSize() but returns size in bytes.
|
||||
+ // We consider one byte as 8 bits.
|
||||
+ const SCEV *getAllocationSizeInBytes(Value *V) const;
|
||||
+
|
||||
+ // Given a Pointer, determine a base pointer of known size, and an offset
|
||||
+ // therefrom.
|
||||
+ // When unable to determine, sets Base to NULL, and Limit/Offset to
|
||||
+ // CouldNotCompute.
|
||||
+ // BaseSize, and Offset are in bytes: Pointer == Base + Offset
|
||||
+ void getPointerOffset(Value *Pointer, Value *&Base, const SCEV *& BaseSize,
|
||||
+ const SCEV *&Offset) const;
|
||||
+
|
||||
+ // Compares the 2 scalar evolution expressions according to predicate,
|
||||
+ // and if it can prove that the result is always true or always false
|
||||
+ // return AlwaysTrue/AlwaysFalse. Otherwise it returns Unknown.
|
||||
+ enum SolverResult compareSCEV(const SCEV *A, Predicate Pred, const SCEV *B,
|
||||
+ const Loop *L);
|
||||
+
|
||||
+ // Determines whether the condition LHS <Pred> RHS is sufficient
|
||||
+ // for the condition A <Pred> B to hold.
|
||||
+ // Currently only ULT/ULE is supported.
|
||||
+ // This errs on the side of returning false.
|
||||
+ bool conditionSufficient(const SCEV *LHS, Predicate Pred1, const SCEV *RHS,
|
||||
+ const SCEV *A, Predicate Pred2, const SCEV *B,
|
||||
+ const Loop *L);
|
||||
+
|
||||
+ // Determines whether Offset is known to be always in [0, Limit) bounds.
|
||||
+ // This errs on the side of returning Unknown.
|
||||
+ enum SolverResult checkLimits(const SCEV *Offset, const SCEV *Limit,
|
||||
+ BasicBlock *BB);
|
||||
+
|
||||
+ virtual bool runOnFunction(Function &F);
|
||||
+ virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
||||
+ void print(raw_ostream &OS, const Module* = 0) const;
|
||||
+ Value *computeAllocationCountValue(Value *P, const Type *&Ty) const;
|
||||
+ private:
|
||||
+ Function *FF;
|
||||
+ TargetData *TD;
|
||||
+ ScalarEvolution *SE;
|
||||
+ LoopInfo *LI;
|
||||
+ DominatorTree *DT;
|
||||
+
|
||||
+ Function *callocFunc;
|
||||
+ Function *reallocFunc;
|
||||
+ PredIteratorCache predCache;
|
||||
+
|
||||
+ SmallPtrSet<const SCEV*, 1> analyzing;
|
||||
+
|
||||
+ enum SolverResult isLoopGuardedBy(const Loop *L, Predicate Pred,
|
||||
+ const SCEV *A, const SCEV *B) const;
|
||||
+ static bool isMonotonic(const SCEV *S);
|
||||
+ bool scevPositive(const SCEV *A, const Loop *L, bool strict=true) const;
|
||||
+ bool conditionSufficient(Value *Cond, bool negated,
|
||||
+ const SCEV *A, Predicate Pred, const SCEV *B);
|
||||
+ Value *getConditionToReach(BasicBlock *A,
|
||||
+ DomTreeNodeBase<BasicBlock> *B,
|
||||
+ bool &negated);
|
||||
+ Value *getConditionToReach(BasicBlock *A,
|
||||
+ BasicBlock *B,
|
||||
+ bool &negated);
|
||||
+ const SCEV *computeAllocationCount(Value *P, const Type *&Ty) const;
|
||||
+ const SCEV *computeAllocationCountForType(Value *P, const Type *Ty) const;
|
||||
+ };
|
||||
+}
|
||||
+#endif
|
||||
+
|
Loading…
Reference in New Issue
Block a user