Git Product home page Git Product logo

nemu's Introduction

Hi there it's unlsycn👋

An ordinary student from China.

Coding for world peace.

Metrics

nemu's People

Contributors

chyuwei avatar ginxian avatar jaypiper avatar junyu33 avatar leojhonsong avatar myyerrol avatar pcrab avatar rapiz1 avatar ruichima avatar ruxiliang avatar sashimi-yzh avatar silver-ymz avatar unlsycn avatar x402 avatar yjmstr avatar

Stargazers

 avatar  avatar

Watchers

 avatar

nemu's Issues

nemu中有个内存bug

Decode结构体的大小会影响difftest成功与否(开启itrace后difftest不报错了..),当Decode大于40bytes时difftest不报错..这简直匪夷所思。
测试发现应该是只和Decode的大小有关,和具体用来占位置的数据成员无关。并且difftest的运行是正常的,受到影响的是ref的状态,且ref的状态并不是直接和dut保持同步(比如在map中把页表项的a位置为false,nemu没有检查出这个错误,spike仍然可以)
进一步测试之后发现,在difftest_step中随便打印点东西(pc,npc,或者是其他随便什么变量,但是纯字符串不行)也能跑出HIT GOOD TRAP
按照常理分析,ref的状态同步应该都是通过diff_set_reg进行的,尝试在每次diff_set_reg时将ref的状态dump下来进行对比,发现两种情况下的状态是相同的,也就是说两次运行时的状态差异不是因为将dut状态同步到ref导致的
从上面的现象来看,直觉上是程序的一个内存bug..于是我打开了ASAN,发现了更奇妙的现象:在打开ASAN后,即使我不对代码做修改,也能跑出HIT GOOD TRAP
为了排除编译器bug,从clang17切换到gcc12,依然出现相同问题。但是gcc+ASAN,即使对代码做修改也稳定输出ABORT
gcc不对代码做修改是HIT GOOD TRAP..Decode在[48, 6)Bytes之间时是ABORT

测试记录:HIT GOOD TRAP
clang+decode3
clang+stepLogvar
clang+ASAN
gcc+decode20
gcc+stepLogvar
gcc+decode20+step
gcc+stepLogStr

ABORT:
clang+stepLogStr
gcc+ASAN
gcc+decode3+steplogvar
gcc+decode3+steplogstr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.