Skip to content

"FATAL: uncaught NLR" with repl + heap lock #17934

@jepler

Description

@jepler

Port, board and/or hardware

unix port, standard variant, x86_64 linux

MicroPython version

v1.27.0-preview-42-gb7cfafc1ee

Reproduction

  1. Start micropython interactively
  2. enter the following lines one by one at the ">>>" prompt:
import micropython
micropython.heap_lock()
  1. press ctrl-d to exit the interactive session

Expected behaviour

No FATAL error

Observed behaviour

This fatal error occurs:

FATAL: uncaught NLR 0x558779c53558

(the address of course varies)

Additional Information

The whole session looks like this:

 ./build-standard/micropython 
MicroPython v1.27.0-preview.42.gb7cfafc1ee.dirty on 2025-08-15; linux [GCC 14.2.0] version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import micropython
>>> micropython.heap_lock()
>>> 
FATAL: uncaught NLR 0x55b472d86558

I suppose that this is mostly a "doctor, doctor" situation but it was previously reported in #4205 and was supposed to have been fixed.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions