gt1 / biobambam2

Tools for early stage alignment file processing
Other
93 stars 17 forks source link

Added an explicit iRODS disconnect to avoid the iRODS 4.19 crash. #31

Closed whitwham closed 8 years ago

whitwham commented 8 years ago

As of iRODS 4.19, any use of iRODS by libmaus2 crashes on program exit. Both iRODS and libmaus2 use statically stored singleton objects that only go out of scope on program exit. As objects are deallocated in reverse order of allocation, the iRODS objects that were created on rcConnect are destroyed before libmaus2 calls rcDisconnect leading to the disconnect code trying to access now invalid memory locations. These changes add an explicit call to disconnect so that it happens before the program ending atexit handlers are called.