Giter Club home page Giter Club logo

Comments (7)

subwire avatar subwire commented on August 18, 2024

I actually successfully ran the tests before merging. Hmm...
Ninja-edit: I just ran fish's test again and it works locally. Looks like there's an incongruency w/ CI somehow.

from angr-platforms.

ltfish avatar ltfish commented on August 18, 2024

I figured out what is going on. Here is the chat log copied from the angr core channel:


fish [1:50 AM]
@lockshaw @subwire
in pyvex/lift/__init__.py:lift()

    for lifter in lifters:
            ...
            next_irsb_part = lifter(arch, addr)._lift(u_data, bytes_offset, max_bytes, max_inst, opt_level, traceflags, allow_lookback)

this is not ideal, since sometimes we have more than one lifters registered (apart from the default VEX lifter), and it's possible that the both lifters are able to lift that instruction

[1:51]
this is exactly why test cases on travis CI is failing: both BPF and MSP430 lifters are currently registered in the CI, and the MSP430 lifter is called first and tries to lift a BPF instruction

[1:55]
here is the old way:

    for lifter, registered_arch in lifters:
        if not isinstance(arch, registered_arch):
            continue

I think the old way is better - we don't accidentally use lifters for one architecture to lift blocks in another architecture

[1:56]
Here is my proposal: we keep a dict that maps each supported architecture to a list of lifters, which will allow us to do the following:

for lifter in arch_lifters[arch.name]:
   ....

what do you think?


EDIT: Fix format issues.

from angr-platforms.

ltfish avatar ltfish commented on August 18, 2024

The related PyVEX commit: angr/pyvex@e47ca1b5

from angr-platforms.

ltfish avatar ltfish commented on August 18, 2024

To reproduce the issue locally: Add the following line at the beginning of test_bpf_idea.py, right after import angr:

from angr_platforms.msp430 import *

from angr-platforms.

subwire avatar subwire commented on August 18, 2024

Now this explains everything.
Yeah, let's add the arch, that makes perfect sense.

from angr-platforms.

github-actions avatar github-actions commented on August 18, 2024

This issue has been marked as stale because it has no recent activity. Please comment or add the pinned tag to prevent this issue from being closed.

from angr-platforms.

github-actions avatar github-actions commented on August 18, 2024

This issue has been closed due to inactivity.

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.