File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,18 @@ AC_ARG_WITH([python-coverage],
4848 [ python_coverage="coverage2"] )
4949AC_SUBST ( python_coverage )
5050
51+ dnl sanitizer
52+ AC_ARG_ENABLE ( [ sanitizer] ,
53+ [ AC_HELP_STRING ([ --enable-sanitizer] ,
54+ [ enable compiling C++ code with -fsanitizer @<:@ default=no@:>@ ] )] ,
55+ [ if test "$enableval" != no; then enable_sanitizer=yes; else enable_sanitizer=no; fi;
56+ if test "$enableval" = yes; then sanitizer=address; else sanitizer=$enableval; fi] ,
57+ [ enable_sanitizer=no] )
58+ if test "$enable_sanitizer" = "yes"; then
59+ SANITIZER_CXXFLAGS="-fsanitize=$sanitizer"; export SANITIZER_CXXFLAGS
60+ fi
61+ AC_SUBST ( SANITIZER_CXXFLAGS )
62+
5163dnl CUBIT I/O w/netcdf
5264AC_ARG_ENABLE ( [ cubit] ,
5365 [ AC_HELP_STRING ([ --enable-cubit] ,
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ libpylith_la_SOURCES = \
146146 utils/TestArray.cc
147147
148148
149-
149+ libpylith_la_CXXFLAGS = $( SANITIZER_CXXFLAGS )
150150libpylith_la_LDFLAGS = $(AM_LDFLAGS ) $(PYTHON_LDFLAGS ) $(PYTHON_LA_LDFLAGS )
151151libpylith_la_LIBADD = \
152152 -lspatialdata \
Original file line number Diff line number Diff line change @@ -590,7 +590,7 @@ pylith::topology::Field::getSubfieldNames(void) const {
590590 names[sinfo.index ] = s_iter->first ;
591591 } // for
592592
593- PYLITH_METHOD_RETURN (pylith::string_vector ( names) );
593+ PYLITH_METHOD_RETURN (names);
594594} // subfieldNames
595595
596596
@@ -599,6 +599,7 @@ pylith::topology::Field::getSubfieldNames(void) const {
599599const pylith::topology::Field::SubfieldInfo&
600600pylith::topology::Field::getSubfieldInfo (const char * name) const {
601601 PYLITH_METHOD_BEGIN;
602+ assert (name);
602603
603604 subfields_type::const_iterator iter = _subfields.find (name);
604605 if (_subfields.end () == iter) {
You can’t perform that action at this time.
0 commit comments