Segfault on stack overflow

前端 未结 6 2213
囚心锁ツ
囚心锁ツ 2021-01-04 08:20

Why does the linux kernel generate a segfault on stack overflow? This can make debugging very awkward when alloca in c or fortran creation of temporary arrays overflows. Sur

6条回答
  •  长情又很酷
    2021-01-04 08:30

    Simply use Valgrind. It will point out all your memory allocation mistakes with excruciating preciseness.

提交回复
热议问题