Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
panic in thread &blah.thread{pc:1, matched:false, matches:map[int][]string{}, time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}, stack:[]interface {}{}} at instr "{neg <nil> 0}": runtime error: index out of range [-1]
panic: runtime error: index out of range [-1] [recovered, repanicked]

goroutine 25 [running, locked to thread]:
github.com/test/project/runtime/vm.(*VM).execute.f2()
github.com/test/project/runtime/vm/vm.go:342 +0x25a
panic({0x5904b147b6a0?, 0x10c00028a1f8?})
runtime/panic.go:783 +0x132
github.com/test/project/runtime/vm.(*thread).Pop(...)
github.com/test/project/runtime/vm/vm.go:91
github.com/test/project/runtime/vm.(*thread).PopInt(0x5904b0e35f2d?)
github.com/test/project/runtime/vm/vm.go:132 +0x4df
github.com/test/project/runtime/vm.(*VM).execute(0x10c0000000e0, 0x10c000014280, {0x7e21d673dc90?, {0x0?, 0x0?}, 0x10c00005a008?})
github.com/test/project/runtime/vm/vm.go:721 +0x25a5
github.com/test/project/runtime/vm.(*VM).ProcessLogLine(0x10c0000000e0, {0x5904b1326cc5?, 0x5904b133c2f5?}, 0x10c00013b140)
github.com/test/project/runtime/vm/vm.go:982 +0x2f9
github.com/test/project/runtime.Fuzz({0x7a71d63e29d0, 0xe, 0xe})
github.com/test/project/runtime/fuzz.go:57 +0x6bd
main.LLVMFuzzerTestOneInput(...)
github.com/test/project/runtime/main.1712287244.go:21
AddressSanitizer:DEADLYSIGNAL
=================================================================
==11256==ERROR: AddressSanitizer: ABRT on unknown address 0x053900002bf8 (pc 0x5904b0ea0ea1 bp 0x10c00003d468 sp 0x10c00003d450 T0)
SCARINESS: 10 (signal)
#0 0x5904b0ea0ea1 in runtime.raise.abi0 runtime/sys_linux_amd64.s:154

==11256==Register values:
rax = 0x0000000000000000 rbx = 0x0000000000000000 rcx = 0x00005904b0ea0ea1 rdx = 0x0000000000000006
rdi = 0x0000000000002bf8 rsi = 0x0000000000002bf8 rbp = 0x000010c00003d468 rsp = 0x000010c00003d450
r8 = 0x0000000000000001 r9 = 0x0000000000000000 r10 = 0x0000000000000008 r11 = 0x0000000000000246
r12 = 0x0000000000002bf8 r13 = 0x000000000000069c r14 = 0x000010c0000028c0 r15 = 0xffffffffffffffff
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: ABRT (/mnt/scratch0/clusterfuzz/bot/builds/clusterfuzz-builds_project_0264546c3sadfd22344ce674621bb6261/revisions/vm-fuzzer+0x2fcea1)
==11256==ABORTING
Original file line number Diff line number Diff line change
Expand Up @@ -3251,6 +3251,19 @@ def test_golang_panic_runtime_error_index_out_of_range(self):
expected_state, expected_stacktrace,
expected_security_flag)

def test_golang_panic_runtime_error_not_ubsan(self):
"""Test golang stacktrace with panic not considered ubsan unknown type."""
data = self._read_test_data('golang_not_ubsan.txt')
expected_type = 'Index out of range'
expected_address = ''
expected_state = 'vm.(*VM).execute.f2\nvm.(*thread).Pop\nruntime.Fuzz\n'
expected_stacktrace = data
expected_security_flag = False
self._validate_get_crash_data(data, expected_type, expected_address,
expected_state, expected_stacktrace,
expected_security_flag)
self.mock.error.assert_not_called()

def test_golang_panic_runtime_error_index_out_of_range_with_msan(self):
"""Test golang stacktrace with panic caused by index out of range
with memory sanitizer."""
Expand Down
10 changes: 5 additions & 5 deletions src/clusterfuzz/stacktraces/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@

# Golang specific regular expressions.
GOLANG_DIVISION_BY_ZERO_REGEX = re.compile(
r'^panic: runtime error: integer divide by zero.*')
r'^panic( in .*)?: runtime error: integer divide by zero.*')
GOLANG_INDEX_OUT_OF_RANGE_REGEX = re.compile(
r'^panic: runtime error: index out of range.*')
r'^panic( in .*)?: runtime error: index out of range.*')
GOLANG_INVALID_MEMORY_ADDRESS_REGEX = re.compile(
r'^panic: runtime error: invalid memory address.*')
r'^panic( in .*)?: runtime error: invalid memory address.*')
GOLANG_MAKESLICE_LEN_OUT_OF_RANGE_REGEX = re.compile(
r'^panic: runtime error: makeslice: len out of range.*')
r'^panic( in .*)?: runtime error: makeslice: len out of range.*')
GOLANG_SLICE_BOUNDS_OUT_OF_RANGE_REGEX = re.compile(
r'^panic: runtime error: slice bounds out of range.*')
r'^panic( in .*)?: runtime error: slice bounds out of range.*')
GOLANG_STACK_OVERFLOW_REGEX = re.compile(r'^fatal error: stack overflow.*')

GOLANG_CRASH_TYPES_MAP = [
Expand Down
Loading