comparch-security / FlexiCAS

A Flexible Cache Architectural Simulator
Other
11 stars 3 forks source link

replace assert error #151

Closed HanJinChi closed 1 month ago

HanJinChi commented 2 months ago

在分支debug-replacer下复现replacer的错误步骤如下:

HanJinChi commented 1 month ago

我在分支debug-replacer下添加了global print以复现错误,复现步骤如下: -首先编译: MODE=debug make pa_regression -j -之后重复运行多线程的程序,直到发生assert报错(这个过程很快,立马就能assert报错) 通过查看temp.log的最后几行的free_map和free_num能查看到是两个线程间出现了数据竞争的情况。

HanJinChi commented 1 month ago

image 可以看到红框处, l1d-0的set 3出现了free_map和free_num不对应的情况,在这里正好出现了两个线程都要修改同一个set的replacer

wsong83 commented 1 month ago

OK, this proof is enough to persuade me.

wsong83 commented 1 month ago

This issue should be fixed by PR #155