Debug options
If you are using our library can be usefull, to put the library in debug mode to discover memory corruption, overflow, memory leak, abuse of the API or bug in your code. The options are activated in different ways if you are compiling the unit tests or you are compiling external code
External code
- defining the macro SE_CLASS1 before include any openfpm headers enable security enhancements of class1,
- define the macro SE_CLASS2 before include any openfpm headers enable security enhancements of class2
- define the macro SE_CLASS3 before include any openfpm headers enable security enhancements of class3
additionally the are are macro that define what to do in case of error
- STOP_ON_ERROR terminate the program before doing something that can produce a crash of the program
- THROW_ON_ERROR it throw an error, that can be catched and the user can recover from this error or do other operations
By default the program report the error but continue the execution
for more information visit here
Unit test
In case of compilation the following options are available
--enable-se-class1 --enable-se-class2 --enable-se-class3 --enable-debug"
- --enable-se-class1 same as SE_CLASS1
- --enable-se-class2 same as SE_CLASS2
- --enable-se-class3 same as SE_CLASS3
- --with-action-on-error=throw same as THROW_ON_ERROR
- --with-action-on-error=error same as STOP_ON_ERROR
for more information visit here