我们知道free一个内存两次,会Aborted

char *p = malloc(100);

free(p);

free(p);

今天发现了又一个Aborted(栈粉碎崩溃):

这个错误stack smashing detected 的定位,

void test(void)

{

  char buf[100]

  memcpy(buf, "aaaa",200);

}

相关文章:

  • 2022-12-23
  • 2022-03-01
  • 2021-08-19
  • 2021-10-22
  • 2022-12-23
  • 2021-06-19
  • 2022-01-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
相关资源
相似解决方案