circuitpython/shared-bindings
Jeff Epler f94d3e86cf
UART: Don't allocate the object so early
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
2021-12-01 20:54:39 -06:00
..
_bleio Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
_eve Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
_pew Merge pull request #5466 from jepler/merge-1.17 2021-10-15 23:34:31 -04:00
_stage Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
_typing _typing: ulab.ndarray is moving 2021-07-20 19:49:43 -05:00
adafruit_bus_device Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
adafruit_pixelbuf Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
aesio aesio: fix docs 2021-11-30 15:25:42 -06:00
alarm Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
analogio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
atexit Convert more modules to use MP_REGISTER_MODULE 2021-08-25 20:48:55 -04:00
audiobusio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
audiocore Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
audioio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
audiomixer Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
audiomp3 Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
audiopwmio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
bitbangio bitbangio.SPI: Handle kwargs like busio.SPI 2021-11-30 17:22:13 -06:00
bitmaptools bitmaptools: Fix the DitgherAlorithm.FloydStenberg value 2021-11-24 09:51:19 -06:00
bitops Fix n_args_min on many MP_DEFINE_CONST_FUN_OBJ_KW() 2021-10-07 16:55:19 -04:00
board Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
busio UART: Don't allocate the object so early 2021-12-01 20:54:39 -06:00
camera camera: Update camera_make_new arguments 2021-11-17 16:42:47 +01:00
canio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
countio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
digitalio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
displayio Fix I2C and feedback from Dan 2021-11-23 17:23:13 -08:00
dualbank Convert more modules to use MP_REGISTER_MODULE 2021-09-01 00:19:05 -04:00
fontio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
framebufferio Fix I2C and feedback from Dan 2021-11-23 17:23:13 -08:00
frequencyio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
gamepadshift Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
getpass Convert more modules to use MP_REGISTER_MODULE 2021-08-26 21:35:02 -04:00
gifio gifio: Add dithered output 2021-10-27 10:54:31 -05:00
gnss Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
i2cperipheral Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
imagecapture Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
ipaddress Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
is31fl3741 Renaming files 2021-11-23 17:21:13 -06:00
keypad Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
math Convert more modules to use MP_REGISTER_MODULE 2021-08-26 21:35:02 -04:00
memorymonitor Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
microcontroller Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
msgpack Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
multiterminal run code formatting script 2021-03-15 19:27:36 +05:30
neopixel_write Convert more modules to use MP_REGISTER_MODULE 2021-08-30 22:29:51 -04:00
nvm boot counter using existing nvm object 2021-09-10 13:43:04 -06:00
onewireio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
os Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
paralleldisplay Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
ps2io Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
pulseio Update D13 to LED, add PWM example. 2021-10-28 13:30:51 -04:00
pwmio Update D13 to LED, add PWM example. 2021-10-28 13:30:51 -04:00
qrio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
rainbowio rainbowio: No need for the ternary here 2021-11-12 17:31:15 -06:00
random Convert more modules to use MP_REGISTER_MODULE 2021-08-30 22:29:51 -04:00
rgbmatrix Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
rotaryio rotaryio: Add the ability to set the divisor 2021-10-16 09:43:45 -05:00
rtc spresense: Fix time.time() 2021-11-30 12:38:48 +01:00
sdcardio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
sdioio Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
sharpdisplay Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
socketpool Fix _bleio.start_advertising arg check; add doc to SocketPool.socket() 2021-10-25 08:43:57 -04:00
ssl Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
storage Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
struct Convert more modules to use MP_REGISTER_MODULE 2021-08-30 22:29:51 -04:00
supervisor Initial broadcom port for Raspberry Pi 2021-11-22 14:54:44 -08:00
synthio Rename make_new's parameter to all_args 2021-10-15 13:49:33 -05:00
terminalio Merge pull request #5466 from jepler/merge-1.17 2021-10-15 23:34:31 -04:00
time Additional missing-prototypes fixes 2021-11-10 10:55:53 -06:00
touchio Merge tag 'v1.17' into merge-1.17 2021-10-15 08:20:54 -05:00
traceback use mp_arg_validate_type for keyword args 2021-10-10 15:28:35 +05:30
uheap Convert more modules to use MP_REGISTER_MODULE 2021-09-01 00:19:05 -04:00
usb_cdc Convert more modules to use MP_REGISTER_MODULE 2021-08-30 22:29:51 -04:00
usb_hid touch up doc 2021-10-18 16:26:12 -04:00
usb_midi Convert more modules to use MP_REGISTER_MODULE 2021-08-30 22:29:51 -04:00
ustack Convert more modules to use MP_REGISTER_MODULE 2021-09-01 00:19:05 -04:00
vectorio Merge pull request #5466 from jepler/merge-1.17 2021-10-15 23:34:31 -04:00
watchdog samd51: Add watchdog timer 2021-10-19 10:52:14 -05:00
wifi like #5571, but for AP 2021-11-16 12:21:50 -06:00
help.rst Apply a Sphinx transform to make the core module docs look better 2020-08-07 00:01:31 +09:00
index.rst docs: Improve 5.0.x <-> main branch doc linkrot 2020-06-14 11:12:35 -05:00
support_matrix.rst Merge MicroPython 1.13 into CircuitPython 2021-05-04 18:06:33 -07:00
util.c
util.h