[Do Not Merge]Replace DEBUGASSERT with runtime null pointer checks#7255
Open
jijo-jacob wants to merge 1 commit intoSamsung:masterfrom
Open
[Do Not Merge]Replace DEBUGASSERT with runtime null pointer checks#7255jijo-jacob wants to merge 1 commit intoSamsung:masterfrom
jijo-jacob wants to merge 1 commit intoSamsung:masterfrom
Conversation
To improve embedded system reliability by ensuring graceful error handling. Replace DEBUGASSERT() macro calls with proper runtime null pointer validation. Signed-off-by: jijo jacob <jijo.jacob@samsung.com>
ewoodev
reviewed
Apr 9, 2026
| { | ||
| /* Power-up and configure GPIOs */ | ||
| DEBUGASSERT(priv); | ||
| if (!priv) { |
Contributor
There was a problem hiding this comment.
Could you please let me know why we need to change return error from DEBUGASSERT?
is priv allowed to be null?
is the BSP code handling error during booting?
Author
There was a problem hiding this comment.
We will change only for syscall, ioctl etc. Not during the booting.
And we also add checks to handle return error in case of syscall.
Contributor
|
I'd like to provide infomation regarding this change. Resources like "priv" cannot be null. If it becomes null, the data, bss, or heap is corrupted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To improve embedded system reliability by ensuring graceful error handling. Replace DEBUGASSERT() macro calls with proper runtime null pointer validation.