Skip to content

Prevent hidden use of non-IRAM interrupt service routines via FunctionalInterrupt API #2748

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

Closed
dok-net opened this issue May 6, 2019 · 4 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@dok-net
Copy link
Contributor

dok-net commented May 6, 2019

If one uses the FunctionaInterrupt attachInterrupt, the ESP32 will accept and execute ISRs that are not in IRAM. The C++ compiler currently does not (same problem in ESP8266) honor IRAM_ATTR for std::bind, std::function, or lambdas - probably never will, or otherwise a lot of std-namespace code would have to be marked as IRAM_ATTR.
This problem is avoided by either either removing (#2734 ) the problematic FunctionalInterrupt interface, or by providing safe scheduling for std::function, std::bind, lambdas through "scheduled ISRs." (TBD, under investigation )

@dok-net
Copy link
Contributor Author

dok-net commented May 11, 2019

#1344 btw is not thread-safe AFAIK.

@stale
Copy link

stale bot commented Jul 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Jul 31, 2019
@stale
Copy link

stale bot commented Aug 14, 2019

This stale issue has been automatically closed. Thank you for your contributions.

@fimtrey
Copy link

fimtrey commented Mar 26, 2020

This may save some people some time. @dok-net Thank you for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

2 participants