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] [Updated] (CELIX-213) SEGFAULT occurs due to memory access after memory is free'd
Date Mon, 02 Feb 2015 22:53:36 GMT

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

Daniel Parker updated CELIX-213:
--------------------------------
    Description: 
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.

  was:
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.


> 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
>
> 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.



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

Mime
View raw message