美文网首页
house of einherjar

house of einherjar

作者: clive0x | 来源:发表于2021-01-30 18:33 被阅读0次

    构造内存如下:

    通过设置c prev_inuse_bit为0,prev_size为 sizeof(a)+ (sizeof(b) + 2*size_t),free c时consolidate 到a,后面malloc时,从a开始分配内存:a+ header of (b) + b。

    把b放入tcache,通过a修改b->fd,达到在指定区域分配内存的目的。

    相关文章

      网友评论

          本文标题:house of einherjar

          本文链接:https://www.haomeiwen.com/subject/vysktltx.html