ivan7wl
ivan7wl
如题,readme中提到了日志助手,想问下后续的开发计划,谢谢!
测试发现在tsdb写入时如果有异常掉电,重新上电可能导致分区异常,log如下: Sector (0x00000000) header info is incorrect. All sector format finished. review代码,疑似问题点如下: 如果使能绕回,在update_sec_status()函数中,有format_sector(db, new_sec_addr)调用,绕回时new_sec_addr为0。 如果在format_sector时候掉电,可能sector header还没写入,下次上电sector 0检查失败,就直接调用tsl_format_all(),把分区全擦除了。
review代码发现某些变量未初始化就被使用了,以kvdb的gc_collect()函数为例: 1. gc_collect()在栈上定义了`struct kvdb_sec_info sector;`,此时sector结构体未初始化,各个字段是随机值 2. sector_iterator()中,首先调用`read_sector_info(db, sec_addr, sector, false);`,但是如果magic检查失败,没有给`sector->status.store`赋值,就直接return了 3. sector_iterator()接下来会引用`sector->status.store`做判断,但此时该字段可能是未初始化的随机值 请作者分析评估一下是否会造成问题,以及其他代码中是否有类似问题。
tsdb数据库初始化时,会指定max_len参数,限制是比扇区大小小即可。 但是tsl_append()中,有以下语句: `db->cur_sec.remain -= LOG_IDX_DATA_SIZE + FDB_WG_ALIGN(blob->size);` 例如设置扇区大小为4096,max_len为4095,最终可能导致remain为负数,最终导致数据混乱,fal write partition地址为负数。
Happens when the limit of pointer's type is not multiple of queue size. For example: pointer type is unsigned byte, from 0 ~ 255 queue size is 100 ``` wr:...
1. puncover parsing aarch64 elf files using arm-none-eabi-objdump (nm), but the aarch64-linux-gnu-objdump (nm) should be used. 2. fix 64bit address parsing, refer to this https://github.com/HBehrens/puncover/pull/51