Giter Club home page Giter Club logo

Comments (12)

zardus avatar zardus commented on August 18, 2024 1

@subwire, do we need to (fix it and) add it to CI?

from angr-platforms.

chq-matteo avatar chq-matteo commented on August 18, 2024 1

@rhelmot ok, don't worry. I understand that managing such a big project is not an easy task

from angr-platforms.

rhelmot avatar rhelmot commented on August 18, 2024 1

...or, uh, lifting.lift will be the canonical way to create an IRSB as soon as an in-progress pull request lands. Right now the canonical way is the IRSB constructor.

from angr-platforms.

rhelmot avatar rhelmot commented on August 18, 2024

So we already CI the angr-platforms repo but this isn't tested code because it's the if __name__ == __main__:` clause on one of the module files, not any of the tests. angr-platform works with the current version of angr, just...... not that one specific blob of code. It should be migrated to the tests directory.

from angr-platforms.

zardus avatar zardus commented on August 18, 2024

Ah, yeah, I thought it was weird if BF wasn't being CIed at all, given that the repo is. I was just too lazy to check on mobile!

Anyways, @chq-matteo, check out https://github.com/angr/angr-platforms/blob/master/tests/test_angr_bf.py for how to use the BF lifter.

What we should do is probably just remove that clause from lift_bf.py

from angr-platforms.

chq-matteo avatar chq-matteo commented on August 18, 2024

Thank you @zardus, my understanding is that test_angr_bf.py works because it doesn't use lift_bf.py.

It relies on engine_bf.py which does not lift the code with Gymrat.

I am interested in lift_bf.py because I like the idea of a lifter helper

from angr-platforms.

rhelmot avatar rhelmot commented on August 18, 2024

So there is a test_lifter_bf.py but it looks like it doesn't actually test the lifter, I stuck some breakpoints in the lifter code and none of them triggered when I ran it. I'm really sorry for putting you through this, apparently our bf lifter is 100% untested.

@subwire please come fix your code

In the meantime, maybe look at the msp430 lifter?

from angr-platforms.

bennofs avatar bennofs commented on August 18, 2024

Isn't this the bug fixed by #15? Not sure if there are more changes that broke the code since then.

from angr-platforms.

chq-matteo avatar chq-matteo commented on August 18, 2024

@bennofs I've just viewed your pr, I did something similar

    lifter = LifterBF(archinfo.arch_from_id('bf'), 0)
    lifter.irsb = irsb_
    lifter.data = test1
    lifter.max_bytes = len(test1)
    lifter.max_inst = len(test1)
    lifter.lift()
    lifter.irsb.pp()

Looking into lifter.py#L52 it looks like I partially reimplemented the _lift method

from angr-platforms.

chq-matteo avatar chq-matteo commented on August 18, 2024

The msp430 lifter also has the same snippet of code as the bf lifter, so I am inclined to believe that there is just some missing commit to Gymrat

Maybe the init method of Gymrat was supposed to call _lift under the hood?

from angr-platforms.

chq-matteo avatar chq-matteo commented on August 18, 2024

SimEngineVEX lift creates an IRSB which in turn uses lifting.lift which uses _lift

Maybe your way is the intended way to use a Gymrat lifter?

from angr-platforms.

rhelmot avatar rhelmot commented on August 18, 2024

lifting.lift is definitely supposed to be the canonical way to create an IRSB.

from angr-platforms.

Related Issues (10)

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.