Hi Andrew,
On the same lines of linked list, what I observed is the assignment of the List
head pointer (function parameter) to the local variable/temporary is not
working .
So the do/while loop goes on until the “count” exceed the maximum PCD set
value. Not sure what is happening, any idea, what could be the cause.
For my debugging I have removed the global optimization flags (Gy, Gl)?
Thanks
Sai
From: Saiprasad Chavali
Sent: Friday, June 19, 2015 6:22 PM
To: edk2-devel@lists.sourceforge.net
Subject: RE: [edk2] Assertion in Linked list - help
Hi Andrew,
The List Head pointer that is passed to the “InsertTailList” API call and to
the “InternalBaseLibIsNodeInList”, differ.
That could be cause of the Assertion, Not sure how this is getting overlayed.
It is inside the same call and is sequential , no other calls?
Thanks
Sai
From: Saiprasad Chavali [mailto:s...@marvell.com]
Sent: Friday, June 19, 2015 5:18 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Assertion in Linked list - help
Thanks Andrew, I haven’t changed the default PCD value. Let me check the cases
you have mentioned. Even if it is repeated calls, I don’t think I can reach the
count of the PCD maximum value.
I verified the “List Empty” case, where I dumped the elements and are no more
than 2/3 in number, before I hit this assertion.
Sai
From: Andrew Fish [mailto:af...@apple.com]
Sent: Friday, June 19, 2015 5:01 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Assertion in Linked list - help
On Jun 19, 2015, at 4:41 PM, Saiprasad Chavali
<s...@marvell.com<mailto:s...@marvell.com>> wrote:
Hi,
I am using the standard API to initialize the lists :
“InitializeListHead(XXX)”. I don’t see it get stuck. If I remove the Assertion
check, it goes through, no issues. The node values and the count are fine.
~/work/src/edk2(master)>git grep PcdMaximumLinkedListLength -- *.dec
MdePkg/MdePkg.dec:1844:
gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000|UINT32|0x00000003
The default for PcdMaximumLinkedListLength is a large value. Did you set it to
another value in your DSC file?
What cause a memory corruption if we think that is the only case? A repeated
call to insertion/remove? Is not happening sequentially?
Well it is C code so memory corruption is easy. Have a bad pointer, or pass the
same data into multiple calls. If you are casting to (LIST_ENTRY *) that may be
a bug too.
LIST_ENTRY ListData;
LIST_ENTRY *ListHead = &ListData;
LIST_ENTRY *ListEntry = &ListData;
InitializeListHead (ListHead);
for (i=0; i<2; i++) {
InsertHeadList (ListHead, ListEntry);
}
Thanks,
Andrew Fish
Thanks
Sai
From: Andrew Fish [mailto:af...@apple.com]
Sent: Friday, June 19, 2015 4:29 PM
To: edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
Subject: Re: [edk2] Assertion in Linked list - help
On Jun 19, 2015, at 4:18 PM, Saiprasad Chavali
<s...@marvell.com<mailto:s...@marvell.com>> wrote:
Hi,
I hit the Assertion (ASSERT (Count < PcdGet32 (PcdMaximumLinkedListLength))),
“Linked list is too long” inside the “InternalBaseLibIsNodeInList” of baselib
“linkedlist.c”.
Almost all the Linked list API, calls this function. There is not one
particular API that throws this error when Invoked inside the Dxe Driver.
If I comment this Assertion call everything works fine. The node elements in
the lists at any point of the time or no more than 3 or 4. So wondering what
could be the cause of this assertion.
It happens most of the time, some kind of timing issue. Suspecting memory
corruption of the links, if so any reason (or) is anything wrong in the way I
initialize the linked lists?
How do you initialize the lists? The lists are circular so I guess you could
get stuck in an infinite loop, if you initialize them incorrectly or have
memory corruption.
Thanks,
Andrew Fish
Your help is so much appreciated.
Thanks
Sai
------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net<mailto:edk2-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel