Git Product home page Git Product logo

Comments (10)

poletti-marco avatar poletti-marco commented on May 1, 2024

It would help if you could provide more information:
What compiler are you using? (and what version?) If you're using clang, are you using the Apple variant or plain Clang installed e.g. via brew?
GCC 5 installed via brew works with address sanitization (I know because I run it in Travis CI, https://travis-ci.org/google/fruit), but other compilers I've tried on OS X don't work with sanitization enabled (it might be a Fruit issue or a compiler issue, not sure).

Unfortunately I don't have a Mac so I'm unable to debug this. If you could run one of the failing tests in a debugger and see where it fails it would be very helpful for me in debugging this.

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

Oh, and also if you run ctest with the --output-on-failure flag, it would tell us what error the tests are failing with.
For an in-source build you should run ctest --output-on-failure from the tests/ directory. For an out-of-source build (say, in a directory called build/), you should run it from the build/tests/ directory.

from fruit.

vendethiel avatar vendethiel commented on May 1, 2024

Running "Apple LLVM 7.3.0". Not sure which clang version that equates...

from fruit.

vendethiel avatar vendethiel commented on May 1, 2024

I tried to glance quickly at the code, in our codebase, it reports the error on HybridVector - a "out-of-container", on "std::vector::push_back"(_slow_path), but I can't figure out how the code can do that ...

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

Could you please run crest as advised in the previous comment and post the resul

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

^result?

from fruit.

vendethiel avatar vendethiel commented on May 1, 2024

Will try tomorrow.

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

Actually I ran the tests in Travis CI and the error there was that AppleClang 7.3.0 doesn't support -fsanitize=undefined at all: https://travis-ci.org/google/fruit/jobs/133207796

I've now removed the INSTRUMENT_WITH_SANITIZERS CMake option in master and changed the postsubmit scripts to pass the desired sanitization in CXXFLAGS, you should probably do the same and pass -fsanitize=address (which is supported by AppleClang) but leaving out the -fsanitize=undefined (which isn't, and was probably causing the failures you saw).
See 982f470

Note that you don't need to update Fruit, just use the latest released version and pass the flag mentioned above in CXXFLAGS instead of using INSTRUMENT_WITH_SANITIZERS.

@vendethiel:
in one of your comments you mention a runtime error in your codebase. If you're unable to find any bug in your code using sanitization, feel free to file a bug for that, ideally providing sample code with which I can reproduce the issue.
I can then check if the sample code is doing sth wrong or if you're hitting a bug in Fruit.

from fruit.

Myushu avatar Myushu commented on May 1, 2024

Hi,

Seems to be related to this: google/sanitizers#362

It works if I recompile fruit itself with sanitizers, then link against it. Bummer...

from fruit.

poletti-marco avatar poletti-marco commented on May 1, 2024

Oh, I see.
Yes, compiling things with different compiler flags that affect behaviour and then linking them together usually doesn't work very well. It's like compiling with different macros set, you're very likely to break the ODR for definitions in headers.

from fruit.

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.