f94d3e86cf
This object has a finalizer, so once it's no longer referenced, GC can call that finalizer and then deallocate the storage. In the case of a failure during construction (e.g., when checking `validate_obj_is_free_pin_or_none`) this will happen on an incompletely initialized structure. On samd, in particular, a newly allocated object (with construct never called) appears to be valid, so GC collecting it causes deinit() to do things, leading to a hard fault. The double creation of the UART object was necessary specifically so that the second allocation would fail. Probably there were other (single call) ways to make it fail, but this was the easiest / the one discovered in real life. Closes: #5493 |
||
---|---|---|
.. | ||
I2C.c | ||
I2C.h | ||
SPI.c | ||
SPI.h | ||
UART.c | ||
UART.h | ||
__init__.c | ||
__init__.h |