celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Parker (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CELIX-213) SEGFAULT occurs due to memory access after memory is free'd
Date Tue, 03 Feb 2015 14:25:35 GMT

     [ https://issues.apache.org/jira/browse/CELIX-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Parker closed CELIX-213.
-------------------------------
    Resolution: Fixed

This issue appears to have been fixed.

> SEGFAULT occurs due to memory access after memory is free'd
> -----------------------------------------------------------
>
>                 Key: CELIX-213
>                 URL: https://issues.apache.org/jira/browse/CELIX-213
>             Project: Celix
>          Issue Type: Bug
>            Reporter: Daniel Parker
>            Assignee: Alexander Broekhuis
>
> log_listenerThread() accesses entries from the 'listenerEntries' list.  However, if the
corresponding entry had been removed and destroyed from the 'entries' list in log_addEntry(),
then accesses to it are invalid and can cause segfaults to occur.
> One solution is to remove the entry from the 'listenerEntries' list in log_addEntry()
to prevent it from being accessed later.
> Alternately, a reference count field could be added to the entry so that the system knows
when the entry can be destroyed.
> Additionally, it looks like log_listenerThread() and log_addEntry() can potentially modify
the 'listenerEntries' list at the same time so it needs another mutex for that list or a redesign
of how the other mutexes are locked or something.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message