-
Notifications
You must be signed in to change notification settings - Fork 28
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
Clang 16 upgrade #48
Clang 16 upgrade #48
Conversation
afac373
to
18efdb4
Compare
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.
Initial review just going through cmakelists.txt and clambc-compiler.py. Lotta dead code to clean up, and some stuff that was disabled/deleted for testing that should be restored (namely the 4 cmake files).
I'll look at the optpass code changes after the break, which I suspect is what you actually wanted me to look at (and not this 😅).
libclambcc/ClamBCChangeMallocArgSize/ClamBCChangeMallocArgSize.cpp
Outdated
Show resolved
Hide resolved
It would be good to update the example pass code to use the new style, as well. In https://github.com/Cisco-Talos/clamav-bytecode-compiler/tree/main/example We should update the CMakeLists.txt / add the new CMakeLists.txt for the object library and shared library. And change all the |
There are still a handful of places where I see
|
There are a bunch of |
Looks like the github workflow also needs to be updated to use clang-16 from clang-8: |
To get the clang-format test to pass, we should also upgrade this to use clang-format-16 with the latest version of the github actions plugin, which will be v4.11.0: |
dd0a8e3
to
c682c3c
Compare
libclambcc/ClamBCRemoveUnsupportedICMPIntrinsics/ClamBCRemoveUnsupportedICMPIntrinsics.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
Co-authored-by: Micah Snyder <[email protected]>
…nsupportedICMPIntrinsics.cpp Co-authored-by: Micah Snyder <[email protected]>
30353a8
to
3c5556a
Compare
All of the CI tests are failing:
|
clam-format was using clang-format-12. I fixed it and re-formatted, so the formatting errors should go away. |
…de-compiler into Clang-16-Upgrade_2
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.
I think you should also delete the Dockerfile
. We now maintain that in the clamav-docker
repo, and having one here confuses things.
I just added a commit that restructures the libclambcc directory and CMakeLists.txt to have all opt-passes' source code (and thus build objects) located in the same directory instead of subdirectories. This fixes the unit tests, because they rely on LD_LIBRARY_PATH to specify a directory where the opt-pass libs are located.
Since I made a commit to fix the unit tests, I snuck in this change as well, deleting the Dockerfile. To test the docker build, will need to grab the Dockerfile from the clamav-docker repo. I'll put in a PR for that in a moment. I have that working as well. |
Here's the clamav-docker PR: Cisco-Talos/clamav-docker#42 |
0ffd5b6
to
d4e870a
Compare
The unit tests rely on all of the opt pass libraries being located in the same directory as libclambccommon.so, as specified using LD_LIBRARY_PATH. One solution would have been to specify a path for each opt pass library in LD_LIBRARY_PATH and then search for each library in each of those LD_LIBRARY_PATH paths. However this felt very clunky. Instead, this commit solves the problem by placing the source for all opt passes in the same directory, which will mean that the .so's created in the build directory will also be co-located and thus using a single path for LD_LIBRARY_PATH will suffice. To make present and future copy-pasting easy, I also renamed the libraries to be camel-case.
d4e870a
to
c51e641
Compare
cacc014
to
714acca
Compare
191ae99
to
0c2153f
Compare
The clang-format-16 check failed |
5224d2f
to
b46684c
Compare
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.
I'm good with this. BCC test pipeline results seemed good, though we did find some improvements needed to the test pipeline itself.
67929e4
to
c376689
Compare
No description provided.