@@ -484,6 +484,29 @@ def is_near_allocator_related_crash(self) -> bool:
484484 """
485485 return self .is_near_allocator_crash or self .is_potential_near_allocator_crash
486486
487+ @cached_property
488+ def num_phc_crashes (self ) -> int :
489+ """The number of crashes that are related to a potential Probabilistic
490+ Heap Checker (PHC) bug.
491+ """
492+ return sum (
493+ crash ["count" ] for crash in self .signature ["facets" ]["phc_alloc_stack" ]
494+ )
495+
496+ @property
497+ def is_potential_phc_crash (self ) -> bool :
498+ """Whether the crash is related to a potential Probabilistic Heap
499+ Checker (PHC) bug.
500+ """
501+ return self .num_phc_crashes > 0
502+
503+ @property
504+ def is_phc_crash (self ) -> bool :
505+ """Whether the crash is related to a potential Probabilistic Heap
506+ Checker (PHC) bug.
507+ """
508+ return self .num_phc_crashes == self .num_crashes
509+
487510
488511class SignatureAnalyzer (SocorroDataAnalyzer , ClouseauDataAnalyzer ):
489512 """Analyze the data related to a signature.
@@ -596,14 +619,11 @@ def fetch_representative_processed_crash(self) -> dict:
596619
597620 @cached_property
598621 def is_potential_security_crash (self ) -> bool :
599- """Whether the crash is related to a potential security bug.
600-
601- The value will be True if:
602- - the signature is related to near allocator poison value crashes, or
603- - one of the potential regressors is a security bug
604- """
605- return self .is_near_allocator_related_crash or any (
606- bug .is_security for bug in self .regressed_by_potential_bugs
622+ """Whether the crash is related to a potential security bug."""
623+ return (
624+ self .is_near_allocator_related_crash
625+ or self .is_potential_phc_crash
626+ or any (bug .is_security for bug in self .regressed_by_potential_bugs )
607627 )
608628
609629 def has_moz_crash_reason (self , reason : str ) -> bool :
@@ -877,6 +897,7 @@ def fetch_socorro_info(self) -> tuple[list[dict], int]:
877897 "cpu_arch" ,
878898 "platform_pretty_version" ,
879899 "_histogram.date" ,
900+ "phc_alloc_stack" ,
880901 # The following are needed for SignatureStats:
881902 "platform" ,
882903 "is_garbage_collecting" ,
0 commit comments