- 博客(4)
- 收藏
- 关注
原创 使用Antlr编写词法分析器
lexer grammar Hello; //lexer 关键字意味着这是一个词法规则文件,名称是 Hello,要与文件名相同// 关键字If : 'if';Int : 'int';// 字面量IntLiteral: [0-9]+;StringLiteral: '"' .*? '"' ; // 字符串字面量// 操作符AssignmentOP: '=' ; //赋值Relatio...
2022-04-20 00:07:58
404
原创 Use After Free
use after free free之后的变量,该变量的堆内存处的内存指针还在指向该内存处,所以当我们下一次申请同样大小的变量时,可以申请到上一个变量的位置 使用gdb可视化观察堆 free() 观察堆 set disassembly-flavor intel set pagination off disassembly main info proc mapping 查看内存映射 deine hook-stop x/56wx 0x8..
2022-04-19 23:58:10
2476
原创 笔记-一推推
stack-buffer-overflow is easy to defend,so lets heap!heap-related:*use-after-frees, double-frees,*andheap-overflowsQuestion is :What is the heap, and what is it for? how the internal implementation of the heap allocator? how new heap chunks are cr.
2022-04-19 23:55:44
147
原创 求逆序数の树状数组
我们假设一个数组A [n]的,当一个A[N] = 0的时候表示数字N没有在集合中出现过,当一个A[N] = 1时则出现过.A对应的树状数组为C [N]。 树状数组中添加函数:在求逆序数时,要添加数字时(A [1],1),即将该数加一,意思是将数字n加入到集合。 树状数组中总和函数:用于求集合中小于等于数字a的元素个数,所以最后要求比数字a大的元素可以用I-sum([I] -1)(I...
2018-11-30 22:35:06
220
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人