github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/report/darwin.go (about)

     1  // Copyright 2021 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 report
     5  
     6  import (
     7  	"regexp"
     8  )
     9  
    10  func ctorDarwin(cfg *config) (reporterImpl, []string, error) {
    11  	symbolizeRes := []*regexp.Regexp{}
    12  	ctx, err := ctorBSD(cfg, darwinOopses, symbolizeRes)
    13  	return ctx, nil, err
    14  }
    15  
    16  var darwinOopses = append([]*oops{
    17  	{
    18  		[]byte("panic(cpu "),
    19  		[]oopsFormat{
    20  			{
    21  				title: compile("panic\\(.+\\): (assertion failed: .*), file"),
    22  				fmt:   "panic: %[1]v",
    23  			},
    24  			{
    25  				title: compile("panic\\(.+\\): Kernel trap at 0x[0-9a-f]+, (type .*), registers"),
    26  				fmt:   "panic: Kernel trap %[1]v",
    27  			},
    28  			{
    29  				title: compile("panic\\(.+\\): \"in6p_route_copyout: wrong or corrupted route:"),
    30  				fmt:   "panic: in6p_route_copyout: wrong or corrupted route",
    31  			},
    32  			{
    33  				title: compile("panic\\(.+\\): \"(zalloc:.+)\\([0-9]+ elements\\)( .*)\""),
    34  				fmt:   "panic: %[1]v%[2]v",
    35  			},
    36  			{
    37  				title: compile("panic\\(.+\\): \"(.*)\""),
    38  				fmt:   "panic: %[1]v",
    39  			},
    40  			{
    41  				title: compile("panic\\(.+\\): (.*)"),
    42  				fmt:   "panic: %[1]v",
    43  			},
    44  		},
    45  		[]*regexp.Regexp{},
    46  	},
    47  	{
    48  		[]byte("Debugger: Unexpected kernel trap number:"),
    49  		[]oopsFormat{
    50  			{
    51  				title: compile("Debugger: (Unexpected kernel trap number: 0x[0-9a-f]+)"),
    52  				fmt:   "debugger: %[1]v",
    53  			},
    54  		},
    55  		[]*regexp.Regexp{},
    56  	},
    57  	&groupGoRuntimeErrors,
    58  }, commonOopses...)