今天在力扣中出现了一个问题:
AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000038ff18 bp 0x7fffcd243bf0 sp 0x7fffcd243ae0 T0)
查询发现涉及到的是系统栈溢出、越界访问的问题。
经过几次尝试的发现,当栈为空时调用 top() 函数,会导致越界报错。
AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000038ff18 bp 0x7fffcd243bf0 sp 0x7fffcd243ae0 T0)
查询发现涉及到的是系统栈溢出、越界访问的问题。
经过几次尝试的发现,当栈为空时调用 top() 函数,会导致越界报错。