Previously code in the SWIG tool didn't handle allocation failures well. Most places didn't check for NULL return from malloc()/realloc()/calloc() at all, typically resulting in undefined behaviour, and some places used assert() to check for a NULL return (which is a misuse of assert() and such checks disappear if built with NDEBUG defined leaving us back with undefined behaviour). All C allocations are now done via wrapper functions (Malloc(), Realloc() and Calloc()) which emit and error and exit with non-zero status on failure, so a non-NULL return can be relied upon. Fixes #1901. |
||
|---|---|---|
| .. | ||
| CParse | ||
| DOH | ||
| Doxygen | ||
| Include | ||
| Modules | ||
| Preprocessor | ||
| Swig | ||
| Makefile.am | ||
| README | ||
SWIG Source directory
Source/DOH - A core set of basic datatypes including
strings, lists, hashes, and files. Used
extensively by the rest of SWIG.
Source/Swig - Swig core. Type-system, utility functions.
Source/Preprocessor - SWIG C Preprocessor
Source/CParse - SWIG C Parser (still messy)
Source/Modules - Language modules.
Source/Include - Include files.