Bird
0
0

Why might Method 2 stack overflow detection fail to detect an overflow in some cases?

hard📝 Conceptual Q10 of 15
FreeRTOS - Memory Management
Why might Method 2 stack overflow detection fail to detect an overflow in some cases?
ABecause Method 2 disables the stack pointer check
BBecause Method 2 only works on single-core processors
CBecause the hook function is called before overflow occurs
DBecause the canary pattern can be overwritten without corrupting the stack pointer
Step-by-Step Solution
Solution:
  1. Step 1: Understand limitations of Method 2

    Method 2 relies on a canary pattern at stack end; if overflow overwrites stack but not canary, overflow may go undetected.
  2. Step 2: Analyze options

    Because the canary pattern can be overwritten without corrupting the stack pointer correctly states this limitation; others are incorrect or irrelevant.
  3. Final Answer:

    Because the canary pattern can be overwritten without corrupting the stack pointer -> Option D
  4. Quick Check:

    Method 2 can miss overflow if canary not corrupted [OK]
Quick Trick: Canary may not detect all overflows if not corrupted [OK]
Common Mistakes:
  • Assuming Method 2 disables pointer checks
  • Thinking hook is called prematurely
  • Believing Method 2 is limited to single-core

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes