github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/report/crash/types.go (about)

     1  // Copyright 2023 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  package crash
     5  
     6  type Type string
     7  
     8  const (
     9  	UnknownType      = Type("")
    10  	Hang             = Type("HANG")
    11  	MemoryLeak       = Type("LEAK")
    12  	DataRace         = Type("DATARACE")
    13  	UnexpectedReboot = Type("REBOOT")
    14  	UBSAN            = Type("UBSAN")
    15  	Bug              = Type("BUG")
    16  	Warning          = Type("WARNING")
    17  	KASAN            = Type("KASAN")
    18  	LockdepBug       = Type("LOCKDEP")
    19  	AtomicSleep      = Type("ATOMIC_SLEEP")
    20  	KMSAN            = Type("KMSAN")
    21  	SyzFailure       = Type("SYZ_FAILURE")
    22  )
    23  
    24  func (t Type) String() string {
    25  	if t == UnknownType {
    26  		return "UNKNOWN"
    27  	}
    28  	return string(t)
    29  }