Module Pulselib.PulseAttribute

module F = Stdlib.Format
module AbstractValue = PulseAbstractValue
module CallEvent = PulseCallEvent
module ConfigName = OpenSource.FbPulseConfigName
module DecompilerExpr = PulseDecompilerExpr
module Invalidation = PulseInvalidation
module TaintItem = PulseTaintItem
module TaintConfig = PulseTaintConfig
module Timestamp = PulseTimestamp
module Trace = PulseTrace
module ValueHistory = PulseValueHistory
type allocator =
  1. | CMalloc
  2. | CustomMalloc of IR.Procname.t
  3. | CRealloc
  4. | CustomRealloc of IR.Procname.t
  5. | CppNew
  6. | CppNewArray
  7. | JavaResource of IR.JavaClassName.t
  8. | CSharpResource of IR.CSharpClassName.t
  9. | ObjCAlloc
  10. | HackAsync
val equal_allocator : allocator -> allocator -> bool
val pp_allocator : F.formatter -> allocator -> unit
type taint_in = {
  1. v : AbstractValue.t;
  2. history : ValueHistory.t;
}

Describes the source of taint in taint propagation.

NOTE: history is ignored in equality and comparison.

val compare_taint_in : taint_in -> taint_in -> int
val equal_taint_in : taint_in -> taint_in -> bool
module Tainted : sig ... end
module TaintSink : sig ... end
module TaintSanitized : sig ... end
type taint_propagation_reason =
  1. | InternalModel
  2. | UnknownCall
  3. | UserConfig
val pp_taint_propagation_reason : F.formatter -> taint_propagation_reason -> unit
module CopyOrigin : sig ... end
module CopiedInto : sig ... end
module ConfigUsage : sig ... end
module UninitializedTyp : sig ... end
module ConstKeys : sig ... end
type t =
  1. | AddressOfCppTemporary of IR.Var.t * ValueHistory.t
  2. | AddressOfStackVariable of IR.Var.t * IBase.Location.t * ValueHistory.t
  3. | Allocated of allocator * Trace.t
  4. | AlwaysReachable
  5. | Closure of IR.Procname.t
  6. | ConfigUsage of ConfigUsage.t
  7. | CopiedInto of CopiedInto.t
    (*

    records the copied var/field for each source address

    *)
  8. | CopiedReturn of {
    1. source : AbstractValue.t;
    2. is_const_ref : bool;
    3. from : CopyOrigin.t;
    4. copied_location : IBase.Location.t;
    }
    (*

    records the copied value for the return address

    *)
  9. | DictContainConstKeys
    (*

    the dictionary contains only constant keys (note: only string constant is supported for now)

    *)
  10. | DictReadConstKeys of ConstKeys.t
    (*

    constant string keys that are read from the dictionary

    *)
  11. | EndOfCollection
  12. | InReportedRetainCycle
  13. | Initialized
  14. | Invalid of Invalidation.t * Trace.t
  15. | LastLookup of AbstractValue.t
  16. | MustBeInitialized of Timestamp.t * Trace.t
  17. | MustBeValid of Timestamp.t * Trace.t * Invalidation.must_be_valid_reason option
  18. | MustNotBeTainted of TaintSink.t TaintSinkMap.t
  19. | JavaResourceReleased
  20. | CSharpResourceReleased
  21. | HackAsyncAwaited
  22. | PropagateTaintFrom of taint_propagation_reason * taint_in list
  23. | ReturnedFromUnknown of AbstractValue.t list
  24. | SourceOriginOfCopy of {
    1. source : PulseAbstractValue.t;
    2. is_const_ref : bool;
    }
    (*

    records the source value for a given copy to lookup the appropriate heap in non-disj domain

    *)
  25. | StaticType of IR.Typ.Name.t
    (*

    type gotten or inferred from types in SIL instructions (only for Hack frontend)

    *)
  26. | StdMoved
  27. | StdVectorReserve
  28. | Tainted of TaintedSet.t
  29. | TaintSanitized of TaintSanitizedSet.t
  30. | Uninitialized of UninitializedTyp.t
  31. | UnknownEffect of CallEvent.t * ValueHistory.t
    (*

    generated by calls to unknown functions to remember that a pointer has been passed to an unknown function and so everything reachable from it has potentially been affected in unknown ways

    *)
  32. | UnreachableAt of IBase.Location.t
    (*

    temporary marker to remember where a variable became unreachable; helps with accurately reporting leaks

    *)
  33. | UsedAsBranchCond of IR.Procname.t * IBase.Location.t * Trace.t
  34. | WrittenTo of Timestamp.t * Trace.t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
val pp : F.formatter -> t -> unit
val filter_unreachable : AbstractValue.Set.t AbstractValue.Map.t -> (AbstractValue.t -> bool) -> t -> t option

update an attribute to get rid of abstract values that do not satisfy the given predicate; the result is None if the attribute becomes meaningless as a result

module Attributes : sig ... end