Jan Kiszka wrote:
> our automatic object cleanup on process termination is "slightly" broken
> for the native skin. The inline and macro magic behind
> __native_*_flush_rq() blindly calls rt_*_delete(), but that's not
> correct for mutexes (we can leak memory and/or corrupt the system heap),
Hmm, xnheap_free is actually robust enough to cope with this invalid
release (sem_heap object to system heap), so no corruptions. Still, we
leak, and that's what made me stumble over these bugs.
> queues and heaps (we may leak shared heaps).
> I'm in the process of fixing this, but that latter two are tricky. They
> need user space information (the user space address of the mapping base)
> for ordinary cleanup, and this is not available otherwise.
> At the time we are called with our cleanup handler, can we assume that
> the dying process has already unmapped all its rtheap segments? In that
> case I could simply pass NULL as base address, and the deletion will
> succeed. If not, I would currently lack a good idea how to resolve this
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
Xenomai-core mailing list