MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / IsAddressOnStack

Function IsAddressOnStack

cli/signalhandler.cpp:70–78  ·  view source on GitHub ↗

* \param[in] ptr address to be examined. * \return true if address is supposed to be on stack (contrary to heap). If ptr is 0 false will be returned. * If unknown better return false. */

Source from the content-addressed store, hash-verified

68 * If unknown better return false.
69 */
70static bool IsAddressOnStack(const void* ptr)
71{
72 if (nullptr==ptr)
73 return false;
74 char a;
75 if (bStackBelowHeap)
76 return ptr < &a;
77 return ptr > &a;
78}
79
80/* (declare this list here, so it may be used in signal handlers in addition to main())
81 * A list of signals available in ISO C

Callers 1

CppcheckSignalHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected