Skip to content

IoGetRemainingStackSize returns address of local variable #3

@harjoc

Description

@harjoc

When compiling a source file which includes wdm.h from this project using GCC 7.3, it warns about:

km/wdm.h: In function ‘IoGetRemainingStackSize’:
km/wdm.h: function returns address of local variable [-Wreturn-local-addr]                                                                                                                         
      return((ULONG_PTR)(&Top) - Bottom );

According to msdn, it should return Top - Bottom instead of &Top - Bottom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions