[Question] Possible XOR a Singly Linked List?

x BlueRobot

Administrator
Staff member
Joined
May 7, 2013
Posts
10,400
I was debugging (will post the example later) a dump file, which seemed to have a problem with a singly linked list and memory alignment leading to a access violation exception.

I noticed within one of the instructions, that a xor assembly instruction was used, I read that you could XOR through a linked list, but this seemed to only apply to a doubly linked list, therefore my question is, is it possible to xor on a singly linked list or that instruction completely unrelated to the problem with the singly linked list?

BSOD 0x0000001E, 1D, 3B on Computer Shutdown - Windows 7 Help Forums
 
I am banned (as are most others here!!) from that site & therefore cannot download the zipped dump file(s).

Can you attach them here, please?

Thanks,

John
 
Code:
FOLLOWUP_IP: 
dxgmms1!VidSchDdiNotifyDpcWorker+36
fffff880`0fd40caa 33f6            [COLOR=#ff0000]xor[/COLOR]     esi,esi

This is the specific area I'm talking about.
 
Sorry. . . don't know about xor.

All dumps named NVIDIA -
Code:
nvlddmkm.sys     Wed Oct 23 02:21:50 2013 (52676AFE)

Did you advise removal of Daemon Tools? -- just a suggestion
 
I advised they check they had the latest WHQL driver installed for nVidia, and then remove Daemon Tools.
 
The XOR in this case is a common used assembly shortcut for zeroing a register, as it will zero any similarities between source and destination. Most CPU architectures perform this faster than pushing a zero value onto the register. You will see this kind of behavior in a lot of functions.

I'm pretty sure this has no application to the actual function of walking through a linked list. Rather, it is just a simple register cleaning operation. It may be involved in a related linked list function, but it in itself does not perform much outside of cleaning up a register for use.

Btw, concerning XOR on linked lists, yes, a XOR linked list is double. However, I'm personally not aware of how to do XOR lists at all if it's through a Windows API call. I'm pretty sure those require actual addresses and nor XOR differences. Correct me if I'm wrong.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top