none
Will recursively traversing through the device tree may lead out of stack space if tree is very deep in user mode? RRS feed

  • Question

  • In some legacy code, we are traversing through the device tree recursively. Now  security concern is if device tree is very deep it may lead stack out of space. So my question is How many maximum number of devices possible in windows? Is this scenario really possible ? How to check the free stack space ,So that at least I can throw an exception when stack is running out of space.

    Thanks in advance.


    Nandkumar T.




    • Edited by prxy Tuesday, September 9, 2014 10:19 AM
    Friday, September 5, 2014 6:50 AM

All replies

  • there is no limit to depth of the tree. when I worked on WDF we had a test bus driver that created a tree 1000 nodes deep successfully.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by Doron Holan [MSFT] Friday, September 5, 2014 7:40 AM
    • Unmarked as answer by prxy Tuesday, September 9, 2014 10:21 AM
    Friday, September 5, 2014 7:40 AM