Git Product home page Git Product logo

Comments (3)

xuankuzcr avatar xuankuzcr commented on May 29, 2024

Great discovery and a very practical tool! Additionally, could you share your configuration operation of AddressSanitizer in the project?

from fast-livo.

kekeliu-whu avatar kekeliu-whu commented on May 29, 2024

Tool usage reference:
https://github.com/google/sanitizers/wiki/AddressSanitizer

Usage:

  1. Change the cmakelists.txt as below:
4,8c4
< SET(CMAKE_BUILD_TYPE "Debug")
<
< ADD_COMPILE_OPTIONS(-std=c++14 )
< ADD_COMPILE_OPTIONS(-std=c++14 )
< set( CMAKE_CXX_FLAGS "-std=c++14 -O3" )
---
> SET(CMAKE_BUILD_TYPE "")
16c12
< set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -std=c++0x -std=c++14 -fexceptions")
---
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -fsanitize=address -O1 -fno-omit-frame-pointer -g -fexceptions")
  1. Build fast-livo with cmake .. -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++ && make (clang must be used instead of gcc)
  2. Run fast-livo to detect memory issues.

Following the steps above, maybe more issues could be found :)

I have made a pull request to fix the bug above: #39. Hope you can merge it!

from fast-livo.

xuankuzcr avatar xuankuzcr commented on May 29, 2024

Thanks for your sharing. I have merged the PR.

from fast-livo.

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.