Created
March 10, 2016 14:49
-
-
Save Buildsoftwaresphere/a265176407d541e9ed28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ac_add_options --disable-jemalloc | |
ac_add_options --enable-valgrind | |
ac_add_options --enable-optimize="-g -O2" |
mac
Mac
On Mac, run Valgrind with the following options.
--smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --show-mismatched-frees=no --dsymutil=yes
The --dsymutil option ensures line number information is present in stack traces.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Linux
--smc-check=all-non-file --vex-iropt-register-updates=allregs-at-mem-access --show-mismatched-frees=no --read-inline-info=yes
The --smc-check and --vex-iropt-register-updates options are necessary to avoid crashes in JIT-generated code.
The --show-mismatched-frees option is necessary due to inconsistent inlining of new and delete -- i.e. one gets inlined but the other doesn't -- which lead to false-positive mismatched-free errors.
The --read-inline-info option improves stack trace readability in the presence of inlining.
Also, run with the following environment variable set.
G_SLICE=always-malloc