Git Product home page Git Product logo

Comments (3)

TheShiftedBit avatar TheShiftedBit commented on April 28, 2024

Hi David,

Sorry it took me so long to get back to you; I've been working on solving #1. Basically, the problem is this: when ASan or UBSan are preloaded, they define certain coverage symbols, and those take precedence over the symbols defined in libFuzzer (which is loaded later). When statically linked, this is solved by ASan/UBSan having weak versions of those symbols, meaning the libFuzzer symbols take precedence. But when they're preloaded, that doesn't work, and libFuzzer doesn't get coverage info. This actually affects native code too, not just Python code.

I've got a solution, but it's horrid. It involves generating patched versions of ASan/UBSan that don't export the weak symbols that should belong to libFuzzer. However, the patch is really fragile. Better solutions would be to either (1) modify LLVM to generate these modified ASan and UBSan shared objects itself, or (2) statically link ASan/UBSan and libFuzzer into the python runtime, and don't link libFuzzer into the Atheris extension.

For question #2, everything should work just like libFuzzer.

For question #3, I think g++ would work too, as long as the pieces were compiled with clang++, but I'm not sure about that.

from atheris.

TheShiftedBit avatar TheShiftedBit commented on April 28, 2024

Hi David,

I've updated Atheris with a solution to #1. It doesn't work (yet) with OSS-Fuzz, but seems to solve all the problems. It's much less horrid than my other solution, thankfully!

from atheris.

DavidKorczynski avatar DavidKorczynski commented on April 28, 2024

Thanks a lot for your explanation as well as the update. Looking forward to following this project.

from atheris.

Related Issues (20)

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.