summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-08-28 11:17:07 -0500
committerJeff Epler <jepler@gmail.com>2020-09-01 10:55:45 -0500
commit2f120c70eee692b8e036f8f0778af2b723e1f0e7 (patch)
tree728dab567d5d6efb06d1e20165647673187db460 /lib
parent9bd2a61d8b2ba56cef241f3b93aed50e718998b5 (diff)
rgbmatrix: recover gracefully from allocation errors
e.g., allocating a 192x32x6bpp matrix would be enough to trigger this reliably on a Metro M4 Express using the "memory hogging" layout. Allocating 64x32x6bpp could trigger it, but somewhat unreliably. There are several things going on here: * we make the failing call with interrupts off * we were throwing an exception with interrupts off * protomatter failed badly in _PM_free when it was partially-initialized Incorporate the fix from protomatter, switch to a non-throwing malloc variant, and ensure that interrupts get turned back on. This decreases the quality of the MemoryError (it cannot report the size of the failed allocation) but allows CircuitPython to survive, rather than faulting.
Diffstat (limited to 'lib')
m---------lib/protomatter0
1 files changed, 0 insertions, 0 deletions
diff --git a/lib/protomatter b/lib/protomatter
-Subproject 761d6437e8cd6a131d51de96974337121a9c716
+Subproject 2a1ba8fa4753b2bcb158c9b17351cf18eade0d2