Closed maxieds closed 4 years ago
Note that in recent builds (at least on Linux with a sane recent g++
), the -fsanitize=address
compiler flag is enabled so long as the build config file scripts/BuildConfig.cfg
contains the setting DEBUGGING=1
. This will cause any particularly pervasive and/or abusive uses of memory on the heap to crash out with a detailed stack trace. Also, setting the bash
shell export (as noted here)
$ export MALLOC_CHECK_=2
should provide some additional runtime error generations if any memory problems with the default libc heap allocation / free functions are found. We cannot, however, ensure that the users will run StructViz with that env variable set.
@ceheitsch Do you have any well reasoned bits of opinionation for me on why we should not leave this mechanism in place in the production code? Technically, it wreaks of a debugging build, but if there are unforeseen errors on Mac, perhaps this will give us some better clues from user reports as to why?
We have now built in memory abuse monitoring libraries enabled whenever DEBUGGING=1
is set in the build-scripts/BuildConfig.cfg
file. This will generate a decent stack trace on impact every time. So, for the time being, I'm going to put this issue aside.
We might consider enhancing the information that is printed on SEGFAULT or other crash by using this library.