[Bug 902] New: Type system appears to destroy helper objects after RTT has exited


Summary: Type system appears to destroy helper objects after
RTT has exited
Product: Toolchain
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: kiwi [dot] net [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The helper objects used to convert between types (e.g. rt_string_ctor_int in
rtt/typekit/RealTimeTypekitConstructors.cpp), appear to be destroyed _after_
RTT has exited (presumably they're destroyed on program exit). This causes
problems when it occurs _after_ TLSF memory pools have been deallocated, and
the helper objects use/contain RTT::rt_string objects. Fault appears to be
present in RTT v1 also (causes a segfault there), though we are using a heavily
patched v1.10 (I did manage to demonstrate the problem on a patched v1.12
version, but there quite a few patches involved).

Demonstrated on toolchain/master under OS X with a couple of small patches
(I'll push them to a gitorious branch).

NB we haven't noticed this prior as to date, as we haven't been deallocating
the TLSF memory pools when exiting our tests (tests/test-runner.cpp allocates a
TLSF memory pool, but doesn't deallocate!). We should rectify this.

Given that RTT v2 does not currently pass all tests on OS X, it is remotely
possible that this is not a real bug ... but given that it appears to be in v1
... shrug ...