Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Valgrind
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Limitations of Memcheck== In addition to the performance penalty, an important limitation of Memcheck is its inability to detect all cases of bounds errors in the use of static or stack-allocated data.<ref>[http://www.valgrind.org/docs/manual/faq.html#faq.overruns Valgrind FAQ]</ref> The following code will pass the ''Memcheck'' tool in Valgrind without incident, despite containing the errors described in the comments: <syntaxhighlight lang="c"> int Static[5]; int func(void) { int Stack[5]; Static[5] = 0; /* Error - Static[0] to Static[4] exist, Static[5] is out of bounds */ Stack [5] = 0; /* Error - Stack[0] to Stack[4] exist, Stack[5] is out of bounds */ return 0; } </syntaxhighlight> The inability to detect all errors involving the access of stack allocated data is especially noteworthy since [[Buffer overflow|certain types of stack errors]] make software [[Vulnerability (computing)|vulnerable]] to the classic [[Stack buffer overflow|stack smashing exploit]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)