Wrong message on malloc fail
Port, board and/or hardware
esp32
MicroPython version
MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32
Reproduction
Allocated a big list
Expected behaviour
Fail with the right message
Observed behaviour
MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32
Additional Information
No, I've provided everything above.
Code of Conduct
Yes, I agree
Wrong size reported while the memory allocation failed.
Port, board and/or hardware
esp32
MicroPython version
MicroPython v1.20.0-729-g82bf0aa19-dirty on 2024-08-17; M5Coreink with ESP32-PICO-D4
Reproduction
while execute lv display driver create function
self.disp_drv = lv.display_create(self.width, self.height)
width and height is same , equal to 200.
Expected behaviour
expected to print correct allocating bytes.
Observed behaviour
MemoryError: memory allocation failed, allocating 1073659464 bytes
Additional Information
As I search the error message inside repo, I found the exception was throw from m_malloc_fail function, at there, size_t variable was cast to uint, maybe uint is smaller than size_t, so it is overflow.
can we use %zu for size_t instead of cast to uint?
Code of Conduct
Yes, I agree