View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002898 | GNUnet | util library | public | 2013-06-19 03:41 | 2013-12-24 20:54 |
| Reporter | Florian Dold | Assigned To | Florian Dold | ||
| Priority | normal | Severity | text | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | Git master | ||||
| Target Version | 0.10.0 | Fixed in Version | 0.10.0 | ||
| Summary | 0002898: removing a DLL's head can fail | ||||
| Description | Removing a DLL's head like this GNUNET_CONTAINER_DLL_remove (my_head, my_tail, my_head); can fail. Without reading the macro's code, one would expect that this simply removes the first element of the list. Instead, a segfault is produced, if the list only has one element. The relevant part of the macro: if ((element)->prev == NULL) \ (head) = (element)->next; \ else \ (element)->prev->next = (element)->next; \ if ((element)->next == NULL) \ (tail) = (element)->prev; \ else \ (element)->next->prev = (element)->prev; \ Note that the true-branch of the second 'if' causes havoc if 'head' and 'element' alias in a 1-element list: 'element' is a NULL pointer, as 'head' has been assigned to NULL. If this won't be fixed it should at least be document, as the above code looks innocent enough to be overlooked. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-06-19 03:41 | Florian Dold | New Issue | |
| 2013-06-19 18:48 | Christian Grothoff | Note Added: 0007164 | |
| 2013-06-19 18:48 | Christian Grothoff | Assigned To | => Florian Dold |
| 2013-06-19 18:48 | Christian Grothoff | Severity | minor => text |
| 2013-06-19 18:48 | Christian Grothoff | Status | new => assigned |
| 2013-06-26 02:44 | Florian Dold | Status | assigned => resolved |
| 2013-06-26 02:44 | Florian Dold | Resolution | open => fixed |
| 2013-06-26 09:51 | Christian Grothoff | Product Version | => Git master |
| 2013-06-26 09:51 | Christian Grothoff | Fixed in Version | => 0.10.0 |
| 2013-06-26 09:51 | Christian Grothoff | Target Version | => 0.10.0 |
| 2013-12-24 20:54 | Christian Grothoff | Status | resolved => closed |