-
Notifications
You must be signed in to change notification settings - Fork 13.3k
detachInterrupt crashes after using argument in __attachInterruptArg() #6049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dok-net the __attachInterruptArg() call is not really exposed and hence not meant to be used by a user in its current form (notice the __ prefix). |
BTW, I invited you to our serial gitter channel. Please join so we can better coordinate efforts. If you didn't receive the mention let me know and I'll send it again. |
@devyte Haven't seen any invite anywhere. |
This issue is fixed by #6048. |
* Properly check for "functional" ISRs and expose C-style attachInterruptArg * Use RAII idiom (cherry picked from commit 15c0b5b356aad0c3032b96ed6db0ec70cbf719d3) # Conflicts: # cores/esp8266/core_esp8266_wiring_digital.cpp * Indentation * Easier reviewability * Refactored after review input. * Finish up insights from review comments.
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Same for enabling interrupt, so just reset software serial buffer indexes. Signed-off-by: 0hax <[email protected]>
A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]>
* uart: Add support for specifying the number of bits and parity. ESP8266SwSerial doesn't really check parity but just read the parity bit and ignore it when receiving data. Signed-off-by: 0hax <[email protected]> * uart: support begin and end methods. A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]> * esphal: add support for detaching an interrupt. That's needed when a component needs to enable/disable interrupt on a gpio. Signed-off-by: 0hax <[email protected]> * uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER. Signed-off-by: 0hax <[email protected]> * uart: use static const uint32_t instead of #define. Signed-off-by: 0hax <[email protected]> * uart: use an enum to handle parity. Signed-off-by: 0hax <[email protected]> * uart: split between esp32 and esp8266. Signed-off-by: 0hax <[email protected]> * uart: check_uart_settings for parity and number of data bits. Signed-off-by: 0hax <[email protected]> * name param data_bits * add new params to test Co-authored-by: Guillermo Ruffino <[email protected]>
* uart: Add support for specifying the number of bits and parity. ESP8266SwSerial doesn't really check parity but just read the parity bit and ignore it when receiving data. Signed-off-by: 0hax <[email protected]> * uart: support begin and end methods. A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]> * esphal: add support for detaching an interrupt. That's needed when a component needs to enable/disable interrupt on a gpio. Signed-off-by: 0hax <[email protected]> * uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER. Signed-off-by: 0hax <[email protected]> * uart: use static const uint32_t instead of #define. Signed-off-by: 0hax <[email protected]> * uart: use an enum to handle parity. Signed-off-by: 0hax <[email protected]> * uart: split between esp32 and esp8266. Signed-off-by: 0hax <[email protected]> * uart: check_uart_settings for parity and number of data bits. Signed-off-by: 0hax <[email protected]> * name param data_bits * add new params to test Co-authored-by: Guillermo Ruffino <[email protected]>
* uart: Add support for specifying the number of bits and parity. ESP8266SwSerial doesn't really check parity but just read the parity bit and ignore it when receiving data. Signed-off-by: 0hax <[email protected]> * uart: support begin and end methods. A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]> * esphal: add support for detaching an interrupt. That's needed when a component needs to enable/disable interrupt on a gpio. Signed-off-by: 0hax <[email protected]> * uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER. Signed-off-by: 0hax <[email protected]> * uart: use static const uint32_t instead of #define. Signed-off-by: 0hax <[email protected]> * uart: use an enum to handle parity. Signed-off-by: 0hax <[email protected]> * uart: split between esp32 and esp8266. Signed-off-by: 0hax <[email protected]> * uart: check_uart_settings for parity and number of data bits. Signed-off-by: 0hax <[email protected]> * name param data_bits * add new params to test Co-authored-by: Guillermo Ruffino <[email protected]>
* uart: Add support for specifying the number of bits and parity. ESP8266SwSerial doesn't really check parity but just read the parity bit and ignore it when receiving data. Signed-off-by: 0hax <[email protected]> * uart: support begin and end methods. A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]> * esphal: add support for detaching an interrupt. That's needed when a component needs to enable/disable interrupt on a gpio. Signed-off-by: 0hax <[email protected]> * uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER. Signed-off-by: 0hax <[email protected]> * uart: use static const uint32_t instead of #define. Signed-off-by: 0hax <[email protected]> * uart: use an enum to handle parity. Signed-off-by: 0hax <[email protected]> * uart: split between esp32 and esp8266. Signed-off-by: 0hax <[email protected]> * uart: check_uart_settings for parity and number of data bits. Signed-off-by: 0hax <[email protected]> * name param data_bits * add new params to test Co-authored-by: Guillermo Ruffino <[email protected]>
* uart: Add support for specifying the number of bits and parity. ESP8266SwSerial doesn't really check parity but just read the parity bit and ignore it when receiving data. Signed-off-by: 0hax <[email protected]> * uart: support begin and end methods. A component may need to reset uart buffer/status by using begin() and end() methods. This is useful for example when a component needs to be sure it is not reading garbage from previously received data over uart. For end() methods with software serial, disabling interrupt is currently impossible because of a bug in esp8266 Core: esp8266/Arduino#6049 Signed-off-by: 0hax <[email protected]> * esphal: add support for detaching an interrupt. That's needed when a component needs to enable/disable interrupt on a gpio. Signed-off-by: 0hax <[email protected]> * uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER. Signed-off-by: 0hax <[email protected]> * uart: use static const uint32_t instead of #define. Signed-off-by: 0hax <[email protected]> * uart: use an enum to handle parity. Signed-off-by: 0hax <[email protected]> * uart: split between esp32 and esp8266. Signed-off-by: 0hax <[email protected]> * uart: check_uart_settings for parity and number of data bits. Signed-off-by: 0hax <[email protected]> * name param data_bits * add new params to test Co-authored-by: Guillermo Ruffino <[email protected]>
Basic Infos
Platform
Settings in IDE
Problem Description
Using detachInterrupt after __attachInterruptArg with a non-null argument, that's also not incidentally of type ArgStructure (as defined in FunctionalInterrupt.h), leads to a crash.
MCVE Sketch
Debug Messages
:Error:9 -> LoadStoreAlignmentCause: Attempt to read/write memory with an unaligned address (for example, trying to read/write a 32-bit word at an address that is not a multiple of 4)
0x4020328b std
0x4010637c Interrupt
0x402010f8 esp_yield
0x401003e4 detachInterrupt
0x4010043c detachInterrupt
0x40201061 setup
0x402011a0 loop_wrapper()
0x40100739 cont_wrapper
The text was updated successfully, but these errors were encountered: