-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[GTK][WPE] CGroupMemoryController::getCgroupFileValue not stack if not numerical value is scanned from the file input (e.g: max) #28337
[GTK][WPE] CGroupMemoryController::getCgroupFileValue not stack if not numerical value is scanned from the file input (e.g: max) #28337
Conversation
EWS run on previous version of this PR (hash 454075d) |
454075d
to
f94a266
Compare
EWS run on previous version of this PR (hash f94a266) |
f94a266
to
65ed88a
Compare
EWS run on previous version of this PR (hash 65ed88a) |
int res = fscanf(file, "%" STRINGIFY(VALUE_BUFFER_SIZE) "[^\n]", rawValue); | ||
|
||
if (res < 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variable res is not really needed, we can check the return code from fscanf
in the if()
ifself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valid point. PR just updated according with this suggestion.
65ed88a
to
f8e9b61
Compare
EWS run on current version of this PR (hash f8e9b61) |
Safe-Merge-Queue: Build #20331. |
Safe-Merge-Queue: Build #20353. |
β¦t numerical value is scanned from the file input (e.g: max) https://bugs.webkit.org/show_bug.cgi?id=273931 Reviewed by Carlos Alberto Lopez Perez. Improves the CGroupMemoryController::getCgroupFileValue by ensuring it handles non-numeric values (e.g., max). Fixes TestNetworkProcessMemoryPressure API test (webkit.org/b/263016). * Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp: (WebKit::CGroupMemoryController::getCgroupFileValue): * Tools/TestWebKitAPI/glib/TestExpectations.json: Canonical link: https://commits.webkit.org/278599@main
f8e9b61
to
a5f69d0
Compare
Committed 278599@main (a5f69d0): https://commits.webkit.org/278599@main Reviewed commits have been landed. Closing PR #28337 and removing active labels. |
Backported into the 2.44 branch as commit 4f68fd3 |
a5f69d0
f8e9b61