Closed not-my-real-name closed 2 years ago
Hi @not-my-real-name ,
Thanks for reporting this, I am going to handle this.
@o-marshmallow
People keep hitting similar issue, https://github.com/espressif/esp-idf/issues/8543#issuecomment-1066713610 Any chance to speed up this bug fix and backport to stable branches ASAP?
@o-marshmallow
There are multiple issues in i2c now. Can you fix this one and backport to stale branches so we can excluding issues one-by-one. ref: https://github.com/espressif/esp-idf/issues/8543#issuecomment-1066713610
@AxelLin Yes, a fix is in progress of being merged
@AxelLin Yes, a fix is in progress of being merged
I still don't find the fix in recent update of master and v4.4 branch.
Backports created:
Target Branch | Merged | Supported | Last N.A. |
---|---|---|---|
master (v5.0) | 36e7ada | null | null |
release/v4.4 | 9f2d407 | v4.4.2 | v4.4.1 |
Environment
Problem Description
Short or incomplete transactions on I2C crash the CPU due to trying to modify a null pointer. Extension of #8348
I think the code also needs a null check earlier on in this function before the while loop.
Expected Behavior
No crash when sending very short commands.
Actual Behavior
Crashes.
Steps to reproduce
I'm using two commands to split up one i2c transaction. I need to respond to data in the frame in order to determine how long my read needs to be after it has already begun. I seem to be encountering the same null head pointer issue at the very beginning of the function as well because my commands are unusually short.
Code to reproduce this issue
Example snippet:
Debug Logs