/images/avatar.png

Java

概述

public class Xxxx {
	public static void main(String[] args) {

概念

  • javac编译,java执行,javap xxx.class反编译,jre:核心类库 + jvm
  • 大小写敏感

工具

IDEA

C++

环境

编译

  • gcc主要编译C语言,对于C++代码只编译而不自动链接C++标准库,需要使用-lstdc++指定
  • g++专门编译C++代码,自动链接C++标准库
./a.out <infile> outfile # 文件重定向, infile文件中为输入

基础

关键字

extern:只声明变量,由外部定义

GO

  • Google开发,高性能,高并发,静态编译,垃圾回收,标准库丰富,跨平台

环境

编译运行

GOPATH下包含目录bin(存放编译后的二进制文件)、pkg(存放编译后的库文件)、src(存放源码文件)

GIT

命令

先 commit 一次后才会真正创建 master 分支

从 git 服务器拉取完整仓库代码

git clone xxx.git

配置开发者用户和邮箱,代码每次提交包含配置

git config user.name xxx
git config user.email xx@xx.com

cat .git/config # 查看配置

git config --list # 获取所有 git 配置

# 配置代理
git config --global http.proxy 127.0.0.1:7890
git config --global https.proxy 127.0.0.1:7890

# 查看代理
git config --global --get http.proxy
git config --global --get https.proxy

# 取消
git config --global --unset http.proxy
git config --global --unset https.proxy

查看文件变动状态

glibc源码分析

Heap

结构

malloc_par

malloc.c中,记录堆管理器的相关参数

struct malloc_par
{
  unsigned long trim_threshold; // 收缩阈值 默认128KB
  /*
  	用于控制main_arena中保留的内存量
  	当释放的chunk为mmap获得的,同时大小大于mmap_threshold,更新mmap_threshold同时将trim_threshold乘2;
  	当释放的chunk大小在 fast bin 范围内,合并完 size 大于 FASTBIN_CONSOLIDATION_THRESHOLD:0x10000,根据该字段缩小 top chunk
  */
  INTERNAL_SIZE_T top_pad;			// 初始化或扩展堆时申请内存是否添加额外pad,默认为0
    								// 调用sbrk函数时在原有请求大小上添加的一个值,是一个填充
  INTERNAL_SIZE_T mmap_threshold;	// mmap分配阈值
  /* 
  	决定sysmalloc用mmap还是sbrk分配内存界限, >则mmap, <则sbrk,
  	若释放的内存通过mmap得到的, 则mmap_threshold与该内存大小取max, 且该值最大不超过DEFAULT_MMAP_THRESHOLD_MAX:0x2000000
  */
  INTERNAL_SIZE_T arena_test; // 最小分配区
  INTERNAL_SIZE_T arena_max;  // 最大分配区
 
  int n_mmaps;			// mmap分配的内存数量, mmap一次+1, munmap一次-1
  int n_mmaps_max;		// 最多能mmap的内存数量
  int max_n_mmaps;		// n_mmaps达到过的最大值

  int no_dyn_threshold;	// 是否开启mmap分配阈值动态调整,默认为0开启
 
  INTERNAL_SIZE_T mmapped_mem;		// 当前 mmap 分配的内存大小总和
  /*INTERNAL_SIZE_T  sbrked_mem;*/
  /*INTERNAL_SIZE_T  max_sbrked_mem;*/
  INTERNAL_SIZE_T max_mmapped_mem;	// mmap 的内存大小总和达到过的最大值
  INTERNAL_SIZE_T max_total_mem;  // 单线程情况下统计进程分配的内存总数
 
  char *sbrk_base; // brk系统调用申请的heap区域的起始地址
};

该结构体类型实例mp_来记录ptmalloc参数

论文阅读记录

论文开源阅读状态是否复现类型
LLM-Fuzzer: Scaling Assessment of Large Language Model Jailbreakshttps://github.com/sherdencooper/GPTFuzzscn大模型模糊测试
FairECom: Towards Proof of E-Commerce Fairness Against Price Discriminationhttps://github.com/CyberSec-Dev/FairECompcn价格歧视规避
PyRTFuzz: Detecting Bugs in Python Runtimes via Two-Level Collaborative Fuzzinghttps://github.com/awen-li/PyRTFuzznnPython模糊测试
Towards Robust Detection of Open Source Software Supply Chain Poisoning Attacks in Industry Environments-fcn软件供应链投毒攻击检测
Cognitive Bias in Decision-Making with LLMshttps://huggingface.co/datasets/jecht/cognitive_bias 数据集fcn大模型认知偏差检测
Generative AI for Game Theory-based Mobile Networking-fcn博弈论,生成式AI

阅读状态:fc(Fully completed), sc(Substantially completed), pc(Partially completed)