celix-commits mailing list archives

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

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

Alexander Broekhuis reassigned CELIX-213:

    Assignee: Alexander Broekhuis

> 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

View raw message