Page MenuHomePhabricator

ASDenysPetrov (Denys Petrov)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 17 2020, 10:23 AM (56 w, 1 d)

Recent Activity

Yesterday

ASDenysPetrov added a comment to D97296: [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function.

This is the only revision in the stack which was bypass your attention. It's fairly harmless although a big one. Please, look at it.

Tue, Apr 13, 1:59 PM · Restricted Project
ASDenysPetrov committed rG01ddfa95bd14: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc… (authored by ASDenysPetrov).
[analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc…
Tue, Apr 13, 8:56 AM
ASDenysPetrov closed D97277: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder.
Tue, Apr 13, 8:56 AM · Restricted Project
ASDenysPetrov committed rG7736b08c2872: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast (authored by ASDenysPetrov).
[analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast
Tue, Apr 13, 8:10 AM
ASDenysPetrov closed D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.
Tue, Apr 13, 8:10 AM · Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Already approved a month ago D97277 :-) That's the next step.

In addition to the above:

Tue, Apr 13, 7:24 AM · Restricted Project
ASDenysPetrov added a comment to D90157: [analyzer] Rework SValBuilder::evalCast function into maintainable and clear way.

@NoQ

Even though NFC commits don't require tests, this doesn't mean they shouldn't add them!

While developing this, I wasn't able to reproduce any regression or unpassed cases on the projects from CodeChecker list (Bitcoin_v0.20.1, Curl_curl-7_66_0, Memchached_1.6.8, OpenSSL_openssl-3.0.0-alpha7, etc.) due to my platform. I use Windows and those projects either don't compile or need hard effort to set them up.
But anyway I was able to detect some different diagnostics in existing tests casts.cpp using Z3 refutation option. That actually helped to make corrections.

Tue, Apr 13, 7:16 AM · Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@NoQ
Many thanks for your evaluation!

Wait, no, nvm, please disregard this. It wasn't like this forever, i just happened to catch code in an intermediate state after D90157. Either way, it's definitely getting much better, and either way, i'm curious if dispatchCast can now be eliminated.

Already approved a month ago D97277 :-) That's the next step.

Tue, Apr 13, 5:10 AM · Restricted Project

Fri, Apr 9

ASDenysPetrov added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

@vsavchenko
Thank you for a proposed solution. It looks much easier to understand and maintain. Great! I will take it into account.

Well, that is a nice exercise for "two pointer" problems, but can we please talk about the actual use case for it?

I'm currently working on integral cast between ranges. Consider the range of int which is casted to char. You've got some ranges of int which obviously should be corespondently represented as some other ranges of char.
Some examples:

int [257, 259]  -> char [1, 3]
int [510, 513]  -> char [-2, 1]
int [42, 1000]  -> char [-128, 127]
int [257, 259] U [2049, 2051]  -> char [1,3] // Here we need `unite` logic to get a casted range because both original ranges lay on the same area after trancation.
Fri, Apr 9, 10:43 AM · Restricted Project

Wed, Apr 7

ASDenysPetrov updated the diff for D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

Updated. Implemented four separate functions RangeSet::Factory::unite. Each function has the most optimized approach to handle intersections for the particular case.

Wed, Apr 7, 3:03 AM · Restricted Project

Sat, Apr 3

ASDenysPetrov added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

@vsavchenko Many thanks for your feedback!
I will make a new separate function for checking intersections considering all your suggestions along with the old quick add versions. I'll be more optimized.

Sat, Apr 3, 7:25 AM · Restricted Project

Fri, Apr 2

ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@steakhal thanks for the approval.

Fri, Apr 2, 1:17 PM · Restricted Project
ASDenysPetrov added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

@vsavchenko FYI.

Fri, Apr 2, 1:10 PM · Restricted Project
ASDenysPetrov updated the diff for D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

Updated. Restored complexity to O(N).

Fri, Apr 2, 12:58 PM · Restricted Project
ASDenysPetrov added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

@vsavchenko
OK, what do you think of *adjacency* feature? I mean it simplifies such ranges [1,2][3,4][5,6] to [1,6]. Is it worth for implementation?

Fri, Apr 2, 10:43 AM · Restricted Project
ASDenysPetrov added a comment to D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.

Thanks for working on improvements of the solver and constraints! However, I have some tough questions about this patch.

What I really want to understand here is motivation. Why do we need to have add operation semantics like this in the first place? My guess is that "the user" will be in the following patch.
Additionally, I don't really like the idea of replacing something simple and fast (old add methods`) with something more complex unconditionally. Old users still don't need this additional logic. C++ has always been the language where we "pay for what we use".
So, with good motivation, I'd still prefer methods like add and addUnchecked or smith similar.

My motivation is that I'm currently working on some bigger improvement (symbolic integral cast) and stucked here of the lack of handling intersections. Would you mind of accepting this revision in case if I restore complexity to O(N+M)?

Fri, Apr 2, 9:54 AM · Restricted Project
ASDenysPetrov requested review of D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency.
Fri, Apr 2, 9:06 AM · Restricted Project
ASDenysPetrov closed D95246: [test] Use host platform specific error message substitution in lit tests .
Fri, Apr 2, 9:04 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov accepted D95246: [test] Use host platform specific error message substitution in lit tests .

This issue has been fixed in https://reviews.llvm.org/D97472.
@ASDenysPetrov I'm unable to close this revision and the other one https://reviews.llvm.org/D95808. Do you know what the appropriate action is here? To abandon this, or accept it again and close it?

Fri, Apr 2, 9:03 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov closed D95808: [test] Use host platform specific error message substitution in lit tests - continued.
Fri, Apr 2, 9:03 AM · Restricted Project, Restricted Project
ASDenysPetrov accepted D95808: [test] Use host platform specific error message substitution in lit tests - continued.

@ASDenysPetrov, I think you need to mark this patch as Accepted so that someone can close this review.

Fri, Apr 2, 9:03 AM · Restricted Project, Restricted Project

Mon, Mar 22

ASDenysPetrov removed a reviewer for D98405: [cmake] Link to libnetwork on Haiku in llvm-jitlink: ASDenysPetrov.

Adding reviewer ASDenysPetrov (you recently reviewed some other work on this tool)

Sorry, I have to refuse your invitation. I have no competence in this. I was a reviewer for other revisions just because I've accidentally discovered fails of several tests on my environment (Windows+GCC+MSYS2), found a causer and raised an issue. I was just testing those patches using my specific environment and giving feedbacks, but not verifing the correctness.

Mon, Mar 22, 10:13 AM · Restricted Project
ASDenysPetrov abandoned D95799: [analyzer] Symbolicate float values with integral casting.
Mon, Mar 22, 7:43 AM · Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Just a ping for you, guys, to let me move in this direction.

Mon, Mar 22, 5:13 AM · Restricted Project

Fri, Mar 19

ASDenysPetrov added a comment to D98861: [CMAKE] Fix cross-compilation build.

I'll check the patch a bit later on my Env.

Fri, Mar 19, 9:13 AM · Restricted Project

Mar 12 2021

ASDenysPetrov added a comment to D98504: [clang][Checkers] Fix PthreadLockChecker state cleanup at dead symbol..

Hi, @balazske

Mar 12 2021, 11:46 AM · Restricted Project

Mar 11 2021

ASDenysPetrov updated the diff for D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Updated.

In D96090#2618410, @NoQ wrote:

In all cases we're supposed to have an original type, whether we need it or not. Simply because we're simulating a typed language. If we don't have it it's a bug.

I agree. That's how evalCastFromNonLoc and evalCastFromLoc work now. Finally I want to replace them along with passing a correct original type. This is just one another step closer to this direction. I don't want patches be too complicated.

Mar 11 2021, 9:03 AM · Restricted Project
ASDenysPetrov added a comment to D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.
In D97388#2615104, @NoQ wrote:

Ok then, let's try to land it! 🤞

Mar 11 2021, 6:56 AM · Restricted Project

Mar 10 2021

ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

You could still pass a default constructed QualType at each callsite.

We can try. At least it will be like this is a hack for the particular cases then, that will emphasis to pay attention to. Well, I'll present this version tomorrow.

Mar 10 2021, 1:07 PM · Restricted Project
ASDenysPetrov retitled D97296: [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function from [analyzer] Add a new parameter ProgramStateRef to SValBuilder::evalCast function to [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function.
Mar 10 2021, 10:32 AM · Restricted Project
ASDenysPetrov updated the diff for D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.
Mar 10 2021, 10:08 AM · Restricted Project
ASDenysPetrov added a comment to D98278: [test] Add ability to get error messages from CMake for errc substitution.

I've checked this change. It works on my configuration at least.

Mar 10 2021, 1:53 AM · Restricted Project, Restricted Project

Mar 9 2021

ASDenysPetrov accepted D97335: [Orc] Add JITLink debug support plugin for ELF x86-64.
Mar 9 2021, 2:25 PM · Restricted Project
ASDenysPetrov added a comment to D97335: [Orc] Add JITLink debug support plugin for ELF x86-64.

@ASDenysPetrov I guess you set the Needs Revision status accidentally?

Right. Probably the action was choosed previously in the drop-down list and I missed it. Sorry.

Mar 9 2021, 11:59 AM · Restricted Project
ASDenysPetrov retitled D97277: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder from [analyzer] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder to [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder.
Mar 9 2021, 9:24 AM · Restricted Project
ASDenysPetrov updated the diff for D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.

Updated due to discussion.

Mar 9 2021, 3:39 AM · Restricted Project
ASDenysPetrov added a comment to rGe984c2b06f0c: Revert "hack to unbreak check-llvm on win after D97335" in attempt for actual….

I'm not an expert in this field but this patch fixes my issue with the build on Windows.

Mar 9 2021, 3:04 AM
ASDenysPetrov requested changes to D97335: [Orc] Add JITLink debug support plugin for ELF x86-64.

Does it fix the issue for you too?

Hi, Stefan. Thanks. I've checked. Yes, this fix (rGe984c2b06f0c59265ba2172bbdb2811c72123701) works for me.

Mar 9 2021, 3:02 AM · Restricted Project
ASDenysPetrov added a comment to D95799: [analyzer] Symbolicate float values with integral casting.

@NoQ wrote:

IIUC this is roughly the first time ever when SValBuilder starts emitting symbols of float type. This is a huge change with an almost unlimited scope of unexpected side effects and very rigorous testing is required to understand the actual effect of this patch on programs that use floats. I think that generally some symbols are always better than no symbols, even if the constraint manager is completely unable to handle them. But we have to make sure that the entirety of SValBuilder and the entirety of RegionStore (and possibly the entirety of ExprEngine) are ready to deal with completely new kinds of values that they've never seen before.

I kind of abandoned this patch. I realized that too much circumstances appeared that I am not an expert in. It is more like an experimental patch which serves to make clear some information, raise a discussion of what another people know about handling floats. Thank you for your sharing. Now I see what potential problems could be. I'm going to proceed as soon as I feel more confident answering these questions.

Mar 9 2021, 1:23 AM · Restricted Project

Mar 5 2021

ASDenysPetrov added a comment to D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.

@NoQ Thanks for your comment.

Mar 5 2021, 11:21 AM · Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@NoQ
Thanks, I could finally draw your attention :)

Mar 5 2021, 11:13 AM · Restricted Project
ASDenysPetrov accepted D97472: [test] Use host platform specific error message substitution in lit tests .
Mar 5 2021, 2:49 AM · Restricted Project

Mar 4 2021

ASDenysPetrov updated the diff for D97296: [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function.

Missed to add changes in unittests. Fixed.

Mar 4 2021, 10:43 AM · Restricted Project
ASDenysPetrov raised a concern with rG900f07611330: hack to unbreak check-llvm on win after https://reviews.llvm.org/D97335.
Mar 4 2021, 7:33 AM
ASDenysPetrov added a comment to rG900f07611330: hack to unbreak check-llvm on win after https://reviews.llvm.org/D97335.

My build fails after this patch. Could you revise your solution?
I'm using Win10, GCC+ninja
Here is my build output:

[32/92] Linking CXX executable bin\llvm-jitlink.exe
FAILED: bin/llvm-jitlink.exe
cmd.exe /C "cd . && D:\WORK\Utilities\MSYS2\mingw64\bin\c++.exe -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment  -O2 -Wl,--stack,16777216    /export:llvm_orc_registerJITLoaderGDBWrapper tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink.cpp.obj tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-elf.cpp.obj tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-macho.cpp.obj -o bin\llvm-jitlink.exe -Wl,--out-implib,lib\libllvm-jitlink.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBinaryFormat.a  lib/libLLVMExecutionEngine.a  lib/libLLVMJITLink.a  lib/libLLVMMC.a  lib/libLLVMObject.a  lib/libLLVMOrcJIT.a  lib/libLLVMOrcShared.a  lib/libLLVMOrcTargetProcess.a  lib/libLLVMRuntimeDyld.a  lib/libLLVMSupport.a  lib/libLLVMMCDisassembler.a  lib/libLLVMExecutionEngine.a  lib/libLLVMJITLink.a  lib/libLLVMOrcTargetProcess.a  lib/libLLVMOrcShared.a  lib/libLLVMRuntimeDyld.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMCoroutines.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMIRReader.a  lib/libLLVMAsmParser.a  lib/libLLVMLinker.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMVectorize.a  lib/libLLVMInstrumentation.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMObject.a  lib/libLLVMBitReader.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMProfileData.a  lib/libLLVMCore.a  lib/libLLVMBinaryFormat.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMSupport.a  -lpsapi  -lshell32  -lole32  -luuid  -ladvapi32  D:/WORK/Utilities/MSYS2/mingw64/lib/libz.dll.a  lib/libLLVMDemangle.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
c++.exe: error: /export:llvm_orc_registerJITLoaderGDBWrapper: No such file or directory
[47/92] Linking CXX executable bin\clang-check.exe
ninja: build stopped: subcommand failed.

Here is my setup output if you're wondering cmake -GNinja ../llvm -DLLVM_LIT_ARGS=-sv -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../install -DLLVM_ENABLE_ASSERTIONS=ON:

Mar 4 2021, 7:31 AM
ASDenysPetrov reopened D97335: [Orc] Add JITLink debug support plugin for ELF x86-64.

My build fails after hack to this patch https://reviews.llvm.org/rG900f076113302e26e1939541b546b0075e3e9721. Could you revise your solution?
I'm using Win10, GCC+ninja
Here is my build output:

[32/92] Linking CXX executable bin\llvm-jitlink.exe
FAILED: bin/llvm-jitlink.exe
cmd.exe /C "cd . && D:\WORK\Utilities\MSYS2\mingw64\bin\c++.exe -Wa,-mbig-obj -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment  -O2 -Wl,--stack,16777216    /export:llvm_orc_registerJITLoaderGDBWrapper tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink.cpp.obj tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-elf.cpp.obj tools/llvm-jitlink/CMakeFiles/llvm-jitlink.dir/llvm-jitlink-macho.cpp.obj -o bin\llvm-jitlink.exe -Wl,--out-implib,lib\libllvm-jitlink.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libLLVMX86Desc.a  lib/libLLVMX86Disassembler.a  lib/libLLVMX86Info.a  lib/libLLVMBinaryFormat.a  lib/libLLVMExecutionEngine.a  lib/libLLVMJITLink.a  lib/libLLVMMC.a  lib/libLLVMObject.a  lib/libLLVMOrcJIT.a  lib/libLLVMOrcShared.a  lib/libLLVMOrcTargetProcess.a  lib/libLLVMRuntimeDyld.a  lib/libLLVMSupport.a  lib/libLLVMMCDisassembler.a  lib/libLLVMExecutionEngine.a  lib/libLLVMJITLink.a  lib/libLLVMOrcTargetProcess.a  lib/libLLVMOrcShared.a  lib/libLLVMRuntimeDyld.a  lib/libLLVMPasses.a  lib/libLLVMTarget.a  lib/libLLVMCoroutines.a  lib/libLLVMipo.a  lib/libLLVMBitWriter.a  lib/libLLVMFrontendOpenMP.a  lib/libLLVMIRReader.a  lib/libLLVMAsmParser.a  lib/libLLVMLinker.a  lib/libLLVMObjCARCOpts.a  lib/libLLVMScalarOpts.a  lib/libLLVMAggressiveInstCombine.a  lib/libLLVMInstCombine.a  lib/libLLVMVectorize.a  lib/libLLVMInstrumentation.a  lib/libLLVMTransformUtils.a  lib/libLLVMAnalysis.a  lib/libLLVMObject.a  lib/libLLVMBitReader.a  lib/libLLVMMCParser.a  lib/libLLVMMC.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMDebugInfoMSF.a  lib/libLLVMTextAPI.a  lib/libLLVMProfileData.a  lib/libLLVMCore.a  lib/libLLVMBinaryFormat.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMSupport.a  -lpsapi  -lshell32  -lole32  -luuid  -ladvapi32  D:/WORK/Utilities/MSYS2/mingw64/lib/libz.dll.a  lib/libLLVMDemangle.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
c++.exe: error: /export:llvm_orc_registerJITLoaderGDBWrapper: No such file or directory
[47/92] Linking CXX executable bin\clang-check.exe
ninja: build stopped: subcommand failed.

Here is my setup output if you're wondering cmake -GNinja ../llvm -DLLVM_LIT_ARGS=-sv -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../install -DLLVM_ENABLE_ASSERTIONS=ON:

Mar 4 2021, 7:27 AM · Restricted Project
ASDenysPetrov updated the diff for D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.

Rebased on main.

Mar 4 2021, 3:42 AM · Restricted Project
ASDenysPetrov updated the diff for D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

Rebased on main.

Mar 4 2021, 3:39 AM · Restricted Project
ASDenysPetrov updated the diff for D97296: [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function.

Rebased on main.

Mar 4 2021, 3:39 AM · Restricted Project
ASDenysPetrov updated the diff for D97277: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder.

Rebased on main.

Mar 4 2021, 3:38 AM · Restricted Project
ASDenysPetrov updated the diff for D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Rebased on main.

Mar 4 2021, 3:38 AM · Restricted Project

Mar 3 2021

ASDenysPetrov requested review of D97874: [analyzer] Improve SVal cast from integer to bool using known RangeSet.
Mar 3 2021, 10:08 AM · Restricted Project
ASDenysPetrov accepted D97472: [test] Use host platform specific error message substitution in lit tests .

LGTM. Let it be the most balanced solution.

Mar 3 2021, 9:10 AM · Restricted Project

Mar 1 2021

ASDenysPetrov added a comment to D97472: [test] Use host platform specific error message substitution in lit tests .

@abhina.sreeskantharajan
I've checked it. This patch works for me. I'm ready to approve.
@jhenderson could you check it again as well?

Mar 1 2021, 8:15 AM · Restricted Project

Feb 26 2021

ASDenysPetrov added a comment to D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

@steakhal

Please make sure that you specify the parent revision or the patch can be applied on top of the tree.

Feb 26 2021, 8:08 AM · Restricted Project
ASDenysPetrov added a comment to D97472: [test] Use host platform specific error message substitution in lit tests .

@abhina.sreeskantharajan
I really prefer the patch you made. Can we just ignore the case as a workaround for Windows in such case?

Feb 26 2021, 7:16 AM · Restricted Project
ASDenysPetrov updated the diff for D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.

A bit improved.

Feb 26 2021, 4:05 AM · Restricted Project

Feb 25 2021

ASDenysPetrov accepted D97472: [test] Use host platform specific error message substitution in lit tests .

I'm not sure why CI is failing, so I've tried rebasing my patch.
I have also fixed this testcase that fails on MSYS, llvm/test/tools/llvm-elfabi/fail-file-write-windows.test.

Feb 25 2021, 11:12 AM · Restricted Project
ASDenysPetrov accepted D97472: [test] Use host platform specific error message substitution in lit tests .
Feb 25 2021, 7:46 AM · Restricted Project
ASDenysPetrov added a comment to D97472: [test] Use host platform specific error message substitution in lit tests .

Thanks, I'm also not sure if the second way is possible. I had another idea but I will need @ASDenysPetrov to test it out.
Does the following python program print out the correct error string for you?

import errno
import os
print ( os.strerror(errno.ENOENT))

If so, we can use this as the error message instead of hardcoding it per platform.

This is my output:

>>> import errno
>>> import os
>>> print(os.strerror(errno.ENOENT))
No such file or directory
>>>

I've tested this patch. Yes, I confirm, it works! Well done!

Feb 25 2021, 7:45 AM · Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@jhenderson
I think I'm done.
Here is output:


Is it OK now?

Feb 25 2021, 5:00 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@jhenderson

Sorry, but -W --trace is not the same as -Wl,--trace. The former is a pair of options used by the compiler (one of which describes the files used by the compiler). The latter is an option passed to the linker, and is what we need. Please try again!

I used -W, because my c++ doesn't know -Wl option.

C:\Users\Denis>c++ -Wl
c++: error: unrecognized command-line option '-Wl'; did you mean '-W'?
c++: fatal error: no input files
compilation terminated.

Could you provide exact cmd line me to use if I'm doing smth wrong?

Feb 25 2021, 3:49 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@jhenderson

Thanks (for clarity, libz isn't what I'm looking for, it was just an example of how this information might be useful). As it is, I think we might need more information still - that commandline hides which files are actually used slightly. Could you try explicitly running the c++ command that is being requested, but with the -Wl,--trace option added too. That will tell the linker to print what files it opens when it runs the link, and should give us an hint as to which system library is different for your usage than ours.

I added -W --trace to the end of cmdline. The output is in the file:

Feb 25 2021, 2:44 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

This shows, for example, that the libz.so my build uses is located in /usr/lib/x86_64-linux-gnu. By having your equivalent path, we can hopefully confirm that the issue is caused by a different set of system libraries being used.

Feb 25 2021, 2:17 AM · Restricted Project, Restricted Project, Restricted Project

Feb 24 2021

ASDenysPetrov requested review of D97388: [analyzer] Replace StoreManager::evalIntegralCast with SValBuilder::evalCast.
Feb 24 2021, 7:33 AM · Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@abhina.sreeskantharajan wrote:

@ASDenysPetrov are you running python inside MSYS bash? that is installed by

No, I installed Python as usual via Windows msi got from official site.

Feb 24 2021, 7:23 AM · Restricted Project, Restricted Project, Restricted Project

Feb 23 2021

ASDenysPetrov requested review of D97296: [analyzer] [NFC] Add a new parameter ProgramStateRef to SValBuilder::evalCast function.
Feb 23 2021, 7:40 AM · Restricted Project
ASDenysPetrov requested review of D97277: [analyzer] [NFC] Eliminate dispatchCast, evalCastFromNonLoc and evalCastFromLoc functions from SValBuilder.
Feb 23 2021, 5:59 AM · Restricted Project

Feb 22 2021

ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@steakhal

I would like @NoQ or someone else to also review this.

Oh, I would be very pleased if our colleagues pay attention to my recent patches. But seems you are the only who helps me with this stuff 🙂

Feb 22 2021, 8:42 AM · Restricted Project

Feb 19 2021

ASDenysPetrov added a comment to D95799: [analyzer] Symbolicate float values with integral casting.

This is just a note for me to correctly rebase it in the future:
https://reviews.llvm.org/D96090?vs=321602&id=322422#toc

Feb 19 2021, 7:31 AM · Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@steakhal wrote:

This patch preserves all previous reports as expected.

If this patch is technically full-baked and does not bring any harm, can we approve it as well to move forward?

Feb 19 2021, 6:39 AM · Restricted Project
ASDenysPetrov updated the diff for D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Rebased revision on top of the main branch. Minor improvements.

Feb 19 2021, 6:32 AM · Restricted Project

Feb 18 2021

ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@abhina.sreeskantharajan

Can you share the output of

sysconfig.get_platform()

Sure,

>>> sysconfig.get_platform()
'win32'
>>>
Feb 18 2021, 10:23 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

This patch preserves all previous reports as expected.

That's great results!

Could you please rebase this?

I'll update and rebase this patch soon.

If it depends on any parent revisions please document them as well.

It does. You can see this in the stack. Do I need to mention this somewhere else?

Feb 18 2021, 10:02 AM · Restricted Project
ASDenysPetrov added a comment to D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker.

@steakhal

Could you please give a few links to some documentation about the functions you are trying to model?

Yes, you a re right. I've edited the summary with the link.

Feb 18 2021, 5:25 AM · Restricted Project
ASDenysPetrov updated the summary of D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker.
Feb 18 2021, 5:24 AM · Restricted Project
ASDenysPetrov updated the summary of D87146: [analyzer] Implement shared semantics checks for XNU functions in PthreadLockChecker.
Feb 18 2021, 5:24 AM · Restricted Project

Feb 17 2021

ASDenysPetrov added a comment to D86465: [analyzer][solver] Redesign constraint ranges data structure.

@vsavchenko
Hi, I actually want this patch goes developing and be loaded. It's really the worth one. Is it abandoned?

Feb 17 2021, 12:29 PM · Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@jhenderson
I'm using
cmake -GNinja ../llvm -DLLVM_LIT_ARGS=-sv -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
for setup and ninja for build. Here is my CMakeCache.txt config file.

Feb 17 2021, 10:22 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

@jhenderson

@ASDenysPetrov, could you provide your link command-line for one of the tools that produces the failing message, please, e.g. llvm-ar?

Here is output of running tests in llvm-ar folder:

Not that I'm saying we shouldn't try to fix your use-case, but if you aren't using Cygwin, it's worth noting that https://llvm.org/docs/GettingStarted.html#hardware states that only Visual Studio builds (whether via the IDE or some other tool like ninja) are known to work for Windows.

Feb 17 2021, 3:11 AM · Restricted Project, Restricted Project, Restricted Project

Feb 16 2021

ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

In D95246#2566417, @abhina.sreeskantharajan wrote:

Feb 16 2021, 2:18 PM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .
Feb 16 2021, 9:33 AM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov committed rG13f4448ae7db: [analyzer] Rework SValBuilder::evalCast function into maintainable and clear way (authored by ASDenysPetrov).
[analyzer] Rework SValBuilder::evalCast function into maintainable and clear way
Feb 16 2021, 4:31 AM
ASDenysPetrov closed D90157: [analyzer] Rework SValBuilder::evalCast function into maintainable and clear way.
Feb 16 2021, 4:31 AM · Restricted Project

Feb 15 2021

ASDenysPetrov added a comment to D95246: [test] Use host platform specific error message substitution in lit tests .

One more mention. There are a lot of popups like this which stops the process untill press OK.


That's very annoying. Please revert or fix this patch.

Feb 15 2021, 1:55 PM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov requested changes to D95246: [test] Use host platform specific error message substitution in lit tests .
Feb 15 2021, 1:34 PM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov reopened D95246: [test] Use host platform specific error message substitution in lit tests .

This patch causes fails in a bunch of test files. When I roll it back, it passes.
Below you can see fail output of ubsan-blacklist-vfs.c and basic-block-sections.c.

Feb 15 2021, 1:34 PM · Restricted Project, Restricted Project, Restricted Project
ASDenysPetrov requested changes to D95808: [test] Use host platform specific error message substitution in lit tests - continued.
Feb 15 2021, 9:25 AM · Restricted Project, Restricted Project
ASDenysPetrov reopened D95808: [test] Use host platform specific error message substitution in lit tests - continued.

Hi, @abhina.sreeskantharajan.
I've just updated my repo and got this patch. After your changes I caught a test fail specifically in my domain of Clang Static Analyzer.
Here is output of Analysis/taint-generic.c


Could you please check it and try to fix?
While testing I'm using build on Win10 + GCC config.

Feb 15 2021, 9:25 AM · Restricted Project, Restricted Project

Feb 12 2021

ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

@steakhal

In the upcoming days, I'm gonna schedule this on our CI. We will see the results.

Feb 12 2021, 9:14 AM · Restricted Project

Feb 11 2021

ASDenysPetrov added a comment to D90157: [analyzer] Rework SValBuilder::evalCast function into maintainable and clear way.

Hi, guys!
Does anyone can review this item, except @steakhal (thanks him)? Please, look.

Feb 11 2021, 9:27 AM · Restricted Project
ASDenysPetrov added inline comments to D86533: (Urgent!) [release][docs][analyzer] Add 11.0.0. release notes.
Feb 11 2021, 3:03 AM · Restricted Project

Feb 9 2021

ASDenysPetrov updated the diff for D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Updated. Unlinked parent revision D95799 from the stack. Made corresponding changes in this patch.
@steakhal I did it. The changes should be safer now.

Feb 9 2021, 9:18 AM · Restricted Project

Feb 5 2021

ASDenysPetrov added a comment to D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.

Please, consider removing D95799 from the parent revisions if that is not a hard requirement of this patch.

Actually D95799 is one of the steps to clean up CastRetrievedVal initially. It significantly reduce the next effort of replacing with evalCast. But if float cast fix blocks the patch stack, I can try to find a way to bypass it.

Feb 5 2021, 3:19 PM · Restricted Project
ASDenysPetrov added a comment to D95877: [analyzer] Fix static_cast on pointer-to-member handling.

I downloaded and tested this patch. On the whole it works OK. See my suggestions below.

Feb 5 2021, 8:30 AM · Restricted Project
ASDenysPetrov updated the diff for D89055: [analyzer] Wrong type cast occures during pointer dereferencing after type punning.

Updated. Rolled the fix over the evalCast refactoring.

Feb 5 2021, 2:55 AM · Restricted Project
ASDenysPetrov added a comment to D89055: [analyzer] Wrong type cast occures during pointer dereferencing after type punning.

@NoQ

Ugh, sorry, no, that's evalCast(). Like evalBinOp() etc. My bad. Can we also use evalCast()?

Finally :-) Now we can use evalCast() instead of CastRetrievedVal(). It would be nice if you could look at D96090.

Feb 5 2021, 1:21 AM · Restricted Project

Feb 4 2021

ASDenysPetrov added a comment to D92928: [analyzer] Highlight arrows for currently selected event.

HTML sample looks fine! But there is the same problem as in D92639. IE doesn't draw arrows.

Feb 4 2021, 4:28 PM · Restricted Project
ASDenysPetrov requested review of D96090: [analyzer] Replace StoreManager::CastRetrievedVal with SValBuilder::evalCast.
Feb 4 2021, 4:11 PM · Restricted Project
ASDenysPetrov updated the diff for D95799: [analyzer] Symbolicate float values with integral casting.

Updated. Moved comments as well.

Feb 4 2021, 3:33 PM · Restricted Project