dlist_check: add check for nodes pointing to themselves - Mailing list pgsql-hackers

From 杨磊
Subject dlist_check: add check for nodes pointing to themselves
Date
Msg-id tencent_09314A06199C6B13095610FB@qq.com
Whole thread Raw
List pgsql-hackers
Hi hackers,

I accidentally called the function dlist_push_head consecutively on the same node, 
inserting it into a doubly linked list, which caused an infinite loop. 
After adding the compile parameter -DILIST_DEBUG, an infinite loop occurred in the dlist_check function, 
revealing that the next pointer of the current node was pointing to itself. 
I am attempting to fix this issue with the following patch.

regards,
Lei Yang
Attachment

pgsql-hackers by date:

Previous
From: Shlok Kyal
Date:
Subject: Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Next
From: Daniel Gustafsson
Date:
Subject: Re: Serverside SNI support in libpq