Skip to content

py/runtime: Only build mp_raise_recursion_depth when STACK_CHECK is on.#19307

Open
dpgeorge wants to merge 1 commit into
micropython:masterfrom
dpgeorge:py-raise-recursion-depth-config
Open

py/runtime: Only build mp_raise_recursion_depth when STACK_CHECK is on.#19307
dpgeorge wants to merge 1 commit into
micropython:masterfrom
dpgeorge:py-raise-recursion-depth-config

Conversation

@dpgeorge
Copy link
Copy Markdown
Member

@dpgeorge dpgeorge commented Jun 4, 2026

Summary

This helper function is used only by the C stack control functions (in py/cstack.c and py/stackctrl.c) and not by pystack. Similarly the qstr message is only used by this mp_raise_recursion_depth() function.

(mp_raise_recursion_depth() is also used by the VM in strict stacless mode when pystack is disabled, but for that configuration one should anyway be enabling C stack checking.)

Testing

Will be tested by CI.

Generative AI

Not used.

This helper function is used only by the C stack control functions (in
`py/cstack.c` and `py/stackctrl.c`) and not by pystack.  Similarly the qstr
message is only used by this `mp_raise_recursion_depth()` function.

(`mp_raise_recursion_depth()` is also used by the VM in strict stacless
mode when pystack is disabled, but for that configuration one should anyway
be enabling C stack checking.)

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge added the py-core Relates to py/ directory in source label Jun 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.47%. Comparing base (75555f4) to head (9403571).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19307   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files         176      176           
  Lines       22845    22845           
=======================================
  Hits        22497    22497           
  Misses        348      348           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Code size report:

Reference:  mimxrt: Mark boards with no TinyUF2 bootloader support. [75555f4]
Comparison: py/runtime: Only build mp_raise_recursion_depth when STACK_CHECK is on. [merge of 9403571]
  mpy-cross:    +0 +0.000% 
   bare-arm:   -40 -0.071% 
minimal x86:   -56 -0.030% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

py-core Relates to py/ directory in source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant