View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009635 | GNUnet | util library | public | 2025-03-18 14:48 | 2025-04-11 14:33 |
Reporter | fefe | Assigned To | schanzen | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | feedback | Resolution | open | ||
Target Version | 0.24.2 | ||||
Summary | 0009635: question about linked lists | ||||
Description | 1916 #define GNUNET_CONTAINER_DLL_remove(head, tail, element) \ 1917 do \ 1918 { \ 1919 GNUNET_assert (((element)->prev != NULL) || ((head) == (element))); \ 1920 GNUNET_assert (((element)->next != NULL) || ((tail) == (element))); \ 1921 if ((element)->prev == NULL) \ 1922 (head) = (element)->next; \ 1923 else \ 1924 (element)->prev->next = (element)->next; \ 1925 if ((element)->next == NULL) \ 1926 (tail) = (element)->prev; \ 1927 else \ 1928 (element)->next->prev = (element)->prev; \ 1929 (element)->next = NULL; \ 1930 (element)->prev = NULL; \ 1931 } while (0) If you remove the last element in the list, head and tail are left pointing to the removed element. Isn't that a problem? | ||||
Tags | No tags attached. | ||||
|
no they are set to NULL in lines 1922 and 1926, respectively as prev and next are null by defintion (last element). |
|
if you mean the list len is larger than one this is also correct I think, unless the prev or next pointer of the element is corrupted |
|
Moving this to 0.24.2 for now but need feedback if this really is an issue and why |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-03-18 14:48 | fefe | New Issue | |
2025-03-20 19:39 | schanzen | Note Added: 0024264 | |
2025-03-20 19:41 | schanzen | Note Added: 0024265 | |
2025-03-20 19:43 | schanzen | Target Version | => 0.24.1 |
2025-04-11 14:33 | schanzen | Assigned To | => schanzen |
2025-04-11 14:33 | schanzen | Status | new => feedback |
2025-04-11 14:33 | schanzen | Note Added: 0024509 | |
2025-04-11 14:33 | schanzen | Target Version | 0.24.1 => 0.24.2 |