Incorrect use of shared_ptr.
found by PVS-Studio https://pvs-studio.com/en/blog/posts/cpp/1003/, N8 & N9.
Paths
| Differential D142309
[LLDB][NFC] Fix a incorrect use of shared_ptr in RenderScriptRuntime.cpp ClosedPublic Authored by xgupta on Jan 22 2023, 8:58 AM.
Details Summary Incorrect use of shared_ptr. found by PVS-Studio https://pvs-studio.com/en/blog/posts/cpp/1003/, N8 & N9.
Diff Detail
Event TimelineComment Actions I don't think this code is going to compile, is it? You took out the if (!buffer) { but left the RHS } so now the scopes are unbalanced. I think you should just change how the shared pointer is defined - which is presumably the substance of the patch - and leave everything after as is. This revision now requires changes to proceed.Jan 23 2023, 6:01 PM Comment Actions
Yeah, correct, I didn't notice carefully. Thanks. Comment Actions LGTM, but I wonder when we'll be able to get rid of RenderScript completely (CC @labath) Comment Actions
@JDevlieghere, Shall I commit the changes after running check-lldb? Comment Actions
I am not going to stand in your way. I usually redirect these questions to @srhines, but I understand he's moved on to other things as well. Closed by commit rG0b8eff1f8724: [LLDB][NFC] Fix a incorrect use of shared_ptr in RenderScriptRuntime.cpp (authored by xgupta). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions
Thanks, no problem. Comment Actions
RenderScript support can be removed. I don't necessarily have the bandwidth to do it immediately, but if someone wants to clean that up, I'd help with reviewing.
Revision Contents
Diff 495153 lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
|