Module Pulselib.PulseDiagnostic

module F = Stdlib.Format
module Attribute = PulseAttribute
module CallEvent = PulseCallEvent
module ConfigName = OpenSource.FbPulseConfigName
module DecompilerExpr = PulseDecompilerExpr
module Invalidation = PulseInvalidation
module TaintItem = PulseTaintItem
module Trace = PulseTrace
module TransitiveInfo = PulseTransitiveInfo
module ValueHistory = PulseValueHistory
type calling_context = (CallEvent.t * IBase.Location.t) list
val compare_calling_context : calling_context -> calling_context -> int
val equal_calling_context : calling_context -> calling_context -> bool
type access_to_invalid_address = {
  1. calling_context : calling_context;
    (*

    the list of function calls leading to the issue being realised, in outermost-to-innermost order, which is an additional common prefix to the traces in the record

    *)
  2. invalid_address : DecompilerExpr.t;
  3. invalidation : Invalidation.t;
  4. invalidation_trace : Trace.t;
    (*

    assuming we are in the calling context, the trace leads to invalidation without further assumptions

    *)
  5. access_trace : Trace.t;
    (*

    assuming we are in the calling context, the trace leads to an access to the value invalidated in invalidation_trace without further assumptions

    *)
  6. must_be_valid_reason : Invalidation.must_be_valid_reason option;
}
val compare_access_to_invalid_address : access_to_invalid_address -> access_to_invalid_address -> int
val equal_access_to_invalid_address : access_to_invalid_address -> access_to_invalid_address -> bool
val yojson_of_access_to_invalid_address : access_to_invalid_address -> Ppx_yojson_conv_lib.Yojson.Safe.t
module ErlangError : sig ... end
module ReadUninitialized : sig ... end
type flow_kind =
  1. | TaintedFlow
  2. | FlowToSink
  3. | FlowFromSource
val equal_flow_kind : flow_kind -> flow_kind -> bool
type retain_cycle_data = {
  1. expr : DecompilerExpr.t;
  2. location : IBase.Location.t option;
  3. trace : Trace.t option;
}
val equal_retain_cycle_data : retain_cycle_data -> retain_cycle_data -> bool
type t =
  1. | AccessToInvalidAddress of access_to_invalid_address
  2. | ConfigUsage of {
    1. pname : IR.Procname.t;
    2. config : ConfigName.t;
    3. branch_location : IBase.Location.t;
    4. location : IBase.Location.t;
    5. trace : Trace.t;
    }
  3. | ConstRefableParameter of {
    1. param : IR.Var.t;
    2. typ : IR.Typ.t;
    3. location : IBase.Location.t;
    }
  4. | CSharpResourceLeak of {
    1. class_name : IR.CSharpClassName.t;
    2. allocation_trace : Trace.t;
    3. location : IBase.Location.t;
    }
  5. | DynamicTypeMismatch of {
    1. location : IBase.Location.t;
    }
  6. | ErlangError of ErlangError.t
  7. | TransitiveAccess of {
    1. tag : string;
    2. description : string;
    3. call_trace : Trace.t;
    4. transitive_callees : TransitiveInfo.Callees.t;
    5. transitive_missed_captures : IR.Typ.Name.Set.t;
    }
  8. | JavaResourceLeak of {
    1. class_name : IR.JavaClassName.t;
    2. allocation_trace : Trace.t;
    3. location : IBase.Location.t;
    }
  9. | HackCannotInstantiateAbstractClass of {
    1. type_name : IR.Typ.Name.t;
    2. trace : Trace.t;
    }
  10. | HackUnawaitedAwaitable of {
    1. allocation_trace : Trace.t;
    2. location : IBase.Location.t;
    }
  11. | MemoryLeak of {
    1. allocator : Attribute.allocator;
    2. allocation_trace : Trace.t;
    3. location : IBase.Location.t;
    }
  12. | MutualRecursionCycle of {
    1. cycle : PulseMutualRecursion.t;
    2. location : IBase.Location.t;
    }
  13. | ReadonlySharedPtrParameter of {
    1. param : IR.Var.t;
    2. typ : IR.Typ.t;
    3. location : IBase.Location.t;
    4. used_locations : IBase.Location.t list;
    }
  14. | ReadUninitialized of ReadUninitialized.t
  15. | RetainCycle of {
    1. values : retain_cycle_data list;
    2. location : IBase.Location.t;
    3. unknown_access_type : bool;
    }
  16. | StackVariableAddressEscape of {
    1. variable : IR.Var.t;
    2. history : ValueHistory.t;
    3. location : IBase.Location.t;
    }
  17. | TaintFlow of {
    1. expr : DecompilerExpr.t;
    2. source : TaintItem.t * ValueHistory.t;
    3. sink : TaintItem.t * Trace.t;
    4. location : IBase.Location.t;
    5. flow_kind : flow_kind;
    6. policy_description : string;
    7. policy_id : int;
    8. policy_privacy_effect : string option;
    }
  18. | UnnecessaryCopy of {
    1. copied_into : PulseAttribute.CopiedInto.t;
    2. source_typ : IR.Typ.t option;
    3. source_opt : DecompilerExpr.source_expr option;
    4. location : IBase.Location.t;
    5. copied_location : (IR.Procname.t * IBase.Location.t) option;
    6. location_instantiated : IBase.Location.t option;
    7. from : PulseAttribute.CopyOrigin.t;
    }

an error to report to the user

include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val pp : F.formatter -> t -> unit
val aborts_execution : t -> bool

whether the presence of an error should abort the execution

val get_message_and_suggestion : t -> string * string option
val get_location : t -> IBase.Location.t
val get_location_instantiated : t -> IBase.Location.t option
val get_copy_type : t -> IR.Typ.t option
val get_issue_type : latent:bool -> t -> IBase.IssueType.t
val get_trace : t -> Absint.Errlog.loc_trace