-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
WiFiUDP:parsePacket() Crashfix #7847
WiFiUDP:parsePacket() Crashfix #7847
Conversation
Notes: I'm not sure how to use nothrow with new keyword. Might need nothrow on |
Note to maintainers: Not sure that we need to run checks on draft PRs. |
|
Found the solution for nothrow in esp8266/Arduino@6925982 |
Hi @mrengineer7777 :) In reality we should transition from using |
@me-no-dev That is a fantastic idea. For now let's fix the current bug. I will create a new issue (feature request) to remind us to refactor WiFiUDP(). |
8cb7da8
to
1e4bb32
Compare
@mrengineer7777 Thanks for the fix and also follow-up with the issue. |
@mrengineer7777 instead of removing |
BTW, what is the status? Does this fix your issue? Can we merge it and have it as part of 2.0.7? |
@me-no-dev I'm excited about the change on cbuf. Looks promising. Will review later. @me-no-dev This PR fixes the UDP issue for me. |
Description of Change
Resolves crash in WiFiUDP:parsePacket() where allocation of
new char[1460];
throws an exception under low memory conditions.Tests scenarios
Tested on FeatherESP32 using UDP socket listener. Using arduino-esp32 core v2.0.5.
Additional testing welcome!
Related links
Closes #4104 (stale/closed), #7558, #7845