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
  11. | HackBuilderResource of IR.HackClassName.t
  12. | FileDescriptor
val equal_allocator : allocator -> allocator -> bool
val pp_allocator : F.formatter -> allocator -> unit
val is_hack_resource : allocator -> bool
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 Builder : 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. | HackBuilder of Builder.t
  13. | HackConstinitCalled
  14. | InReportedRetainCycle
  15. | Initialized
  16. | Invalid of Invalidation.t * Trace.t
  17. | LastLookup of AbstractValue.t
  18. | MustBeInitialized of Timestamp.t * Trace.t
  19. | MustBeValid of Timestamp.t * Trace.t * Invalidation.must_be_valid_reason option
  20. | MustNotBeTainted of TaintSink.t TaintSinkMap.t
  21. | JavaResourceReleased
  22. | CSharpResourceReleased
  23. | HackAsyncAwaited
  24. | PropagateTaintFrom of taint_propagation_reason * taint_in list
  25. | ReturnedFromUnknown of AbstractValue.t list
  26. | 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

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

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

    *)
  28. | StdMoved
  29. | StdVectorReserve
  30. | Tainted of TaintedSet.t
  31. | TaintSanitized of TaintSanitizedSet.t
  32. | Uninitialized of UninitializedTyp.t
  33. | 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

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

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

    *)
  35. | UsedAsBranchCond of IR.Procname.t * IBase.Location.t * Trace.t
  36. | 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