- Fix the reason for the crash of SWIGing
- Write some atomic c++ feature tests
What I did:
- Bisected test "special_variables" to trigger
a swig crash with a sufficient amount of code:
declaration = "$fulldecl $decl";
It turned out, that it's a dereferenced NULL
access of strstr in Source/Swig/misc.c
I assumed that for some reason swig isn't meant
to have save calls (maybe to prevent hiding "bugs"
elsewhere) and had a look at what called it.
It is called when creating the destructor
wrapper call. Since it didn't seem to be an
important case and the solution wasn't obvious how
to fix it in the c module, I postponed it.
- Wrote some basic C++ feature tests. I
complained about the way tests are written/named
(multi feature composition/unrelated name) in
earlier mails and therefore started to implement
more basic tests, dedicated to single features or
explicitly naming the features they test. These
include nothing but what they name. The name
"atomic" might be a bit misleading here (thanks
William!) and might be soon renamed to "native" to
resolve ambiguities with threading stuff.
- Implemented those tests for the C backend
- Fixed wrapper typemaps to only cast if type
is complex/swig object
- Fixed partialcheck of C backend
Running the partialcheck revealed that swig
crashes once because of the reasons named above.
What I didn't do:
I didn't continue to try to swig pugixml,
because it's simply to huge and the benefit might
be not worth it. It uses a lot of things that need
manual treatment in the interface file.
Tasks for this weeks are:
- Prioritize C++ features which don't work and
[- Write more basic tests]