上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: 在VPP的源码CMakeLists.txt中已经有address sanitizer的编译参数只是默认是OFF的。只要改为ON就可以在VPP代码启用内存检测功能。 阅读全文
posted @ 2023-07-09 12:11 liqinglucky 阅读(370) 评论(0) 推荐(0) 编辑
摘要: Address Sanitizer集成的原理是在汇编过程中编译出.o文件时就将AddressSanitizer的运行时库替换malloc()/free()实现内存检测功能的。所以可以单独在执行程序(main executable)加Address Sanitizer,也可以在链接库中单独加Address Sanitizer。 阅读全文
posted @ 2023-07-09 11:17 liqinglucky 阅读(679) 评论(0) 推荐(0) 编辑
摘要: Docker只是提供了一个运行环境,Docker里的程序集成Address Sanitizer与Linux环境编译相比并不需要做任何额外改动。 阅读全文
posted @ 2023-07-09 10:16 liqinglucky 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Address Sanitizer(asan)是一个内存检测工具,从gcc 4.8开始,Address Sanitizer成为了GCC的一部分。只要在编译自己的代码时加上响应的编译参数就可以很方便的加上内存检测的功能。 这套sanitizer工具包含了三大件: - Address Sanitizer: 检测指针重复释放问题,堆,栈内存溢出问题。 - Thread Sanitizer[^1]: 线程问题。 - Memory Sanitizer: 内存未初始化问题。 阅读全文
posted @ 2023-07-08 22:05 liqinglucky 阅读(1783) 评论(0) 推荐(1) 编辑
摘要: 原文地址: https://www.cnblogs.com/liqinglucky/p/sudoers.html Ubuntu系统中查看sudoers文件 $ vi /etc/sudoers 文件内容 # See the man page for details on how to write a 阅读全文
posted @ 2023-06-29 08:50 liqinglucky 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/liqinglucky/p/pointer_value.html 指针 #include<stdio.h> void msg(int *in,int *out) { int *sen; int *rec; sen = in;//send的地址 阅读全文
posted @ 2023-06-29 08:48 liqinglucky 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/liqinglucky/p/pointer.html 在计算机中,数据都是存放于内存单元中。每个内存单元就是数据的存放地址。这样存放地址就指向我们定义的变量,指针就是内存单元的地址。 #include<stdio.h> void main(v 阅读全文
posted @ 2023-06-29 08:46 liqinglucky 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/liqinglucky/p/ipv6_mask.html 将前缀长度转成子网掩码 #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa 阅读全文
posted @ 2023-06-29 08:40 liqinglucky 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/liqinglucky/p/fourier.html import matplotlib.pyplot as plt import numpy as np t = np.arange(-2*np.pi, 2*np.pi, 0.01) s =( 阅读全文
posted @ 2023-06-29 08:35 liqinglucky 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/liqinglucky/p/snprintf.html 在使用log函数打印时想打印整个结构体的值出来,但是结构体比较大,如果用log函数一行一行打印显示效果不好。就想用snprintf追加拼接字符串到一个buffer里,最后再把整个buff 阅读全文
posted @ 2023-06-28 10:06 liqinglucky 阅读(600) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页