Skip to content

Commit 575b2e8

Browse files
committed
chore(deps): lock file maintenance
Update system dependencies with `nix flake update`. This update comes with a bunch of formatting changes, but the most significant change is dropping support for LLVM 15. With enough Nix work this can be avoided, and it's unfortunate because LLVM 17 is as yet unsupported (by memory a big perf regression in compilation speed), so we'll only support one version for a while. I think it makes more sense given the current state of the project to localise all users on exactly one working config than attempt to support multiple.
1 parent f7baf34 commit 575b2e8

File tree

10 files changed

+36
-41
lines changed

10 files changed

+36
-41
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: 16-core-ubuntu
3131
strategy:
3232
matrix:
33-
llvm_version: [15, 16]
33+
llvm_version: [16]
3434
steps:
3535
- uses: actions/[email protected]
3636
- uses: cachix/install-nix-action@v27
@@ -39,16 +39,16 @@ jobs:
3939
- name: build (LLVM ${{ matrix.llvm_version }})
4040
# Run the build manually in `nix develop` to keep non-outputs around
4141
run: |
42-
nix develop .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja -DWITH_FLAKY_TESTS=Off -DFORCE_BOOST_STATIC=Off
43-
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ninja -C build
42+
nix develop -i .#oid-llvm${{ matrix.llvm_version }} --command cmake -B build -G Ninja -DWITH_FLAKY_TESTS=Off -DFORCE_BOOST_STATIC=Off
43+
nix develop -i .#oid-llvm${{ matrix.llvm_version }} --command ninja -C build
4444
- name: test (LLVM ${{ matrix.llvm_version }})
4545
env:
4646
# disable drgn multithreading as tests are already run in parallel
4747
OMP_NUM_THREADS: 1
4848
run: |
4949
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
50-
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ./tools/config_gen.py -c clang++ build/testing.oid.toml
51-
nix develop .#oid-llvm${{ matrix.llvm_version }} --command ctest \
50+
nix develop -i .#oid-llvm${{ matrix.llvm_version }} --command ./tools/config_gen.py -c clang++ build/testing.oid.toml
51+
nix develop -i .#oid-llvm${{ matrix.llvm_version }} --command ctest \
5252
--test-dir build/test/ \
5353
--test-action Test \
5454
--parallel \

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ find_package(LLVM ${LLVM_REQUESTED_VERSION} REQUIRED CONFIG)
224224
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
225225
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
226226

227-
if((${LLVM_VERSION_MAJOR} VERSION_LESS 15) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 16))
228-
message(SEND_ERROR "Object Introspection currently requires an LLVM version between 15 and 16!")
227+
if((${LLVM_VERSION_MAJOR} VERSION_LESS 16) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER 16))
228+
message(SEND_ERROR "Object Introspection currently requires LLVM version 16!")
229229
endif()
230230

231231
find_package(Clang REQUIRED CONFIG)

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@
8484
libmicrohttpd
8585
liburing
8686
libxml2
87-
lzma
8887
msgpack
8988
range-v3
9089
rocksdb_8_11
9190
sqlite
9291
tomlplusplus
92+
xz
9393
zstd
9494
]);
9595

@@ -115,13 +115,11 @@
115115
packages = rec {
116116
default = self.packages.${system}."oid-llvm${toString defaultLlvmVersion}";
117117

118-
oid-llvm15 = mkOidPackage 15;
119118
oid-llvm16 = mkOidPackage 16;
120119
};
121120
devShells = rec {
122121
default = self.devShells.${system}."oid-llvm${toString defaultLlvmVersion}";
123122

124-
oid-llvm15 = mkOidDevShell 15;
125123
oid-llvm16 = mkOidDevShell 16;
126124
};
127125

oi/Descs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::optional<uintptr_t> FuncDesc::Arg::findAddress(
4242
user_regs_struct modifiedRegs = *regs;
4343
oi::detail::arch::setProgramCounter(modifiedRegs, pc);
4444

45-
struct drgn_object object {};
45+
struct drgn_object object{};
4646
BOOST_SCOPE_EXIT_ALL(&) {
4747
drgn_object_deinit(&object);
4848
};

oi/OID.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ void sigIntHandler(int sigNum) {
236236
}
237237

238238
void installSigHandlers(void) {
239-
struct sigaction nact {};
240-
struct sigaction oact {};
239+
struct sigaction nact{};
240+
struct sigaction oact{};
241241

242242
nact.sa_handler = sigIntHandler;
243243
sigemptyset(&nact.sa_mask);

oi/OIDebugger.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void OIDebugger::dumpRegs(const char* text,
181181
*/
182182
bool OIDebugger::singleStepFunc(pid_t pid, uint64_t real_end) {
183183
uint64_t addr = 0x0;
184-
struct user_regs_struct regs {};
184+
struct user_regs_struct regs{};
185185
uint64_t prev = 0;
186186

187187
do {
@@ -816,7 +816,7 @@ OIDebugger::processTrapRet OIDebugger::processJitCodeRet(
816816

817817
if (VLOG_IS_ON(4)) {
818818
errno = 0;
819-
struct user_regs_struct newregs {};
819+
struct user_regs_struct newregs{};
820820
if (ptrace(PTRACE_GETREGS, pid, NULL, &newregs) < 0) {
821821
LOG(ERROR) << "Execute: Couldn't restore registers: "
822822
<< strerror(errno);
@@ -875,14 +875,14 @@ bool OIDebugger::processGlobal(const std::string& varName) {
875875
}
876876

877877
errno = 0;
878-
struct user_regs_struct regs {};
878+
struct user_regs_struct regs{};
879879
if (ptrace(PTRACE_GETREGS, traceePid, nullptr, &regs) < 0) {
880880
LOG(ERROR) << "processGlobal: failed to read registers" << strerror(errno);
881881
return false;
882882
}
883883

884884
errno = 0;
885-
struct user_fpregs_struct fpregs {};
885+
struct user_fpregs_struct fpregs{};
886886
if (ptrace(PTRACE_GETFPREGS, traceePid, nullptr, &fpregs) < 0) {
887887
LOG(ERROR) << "processGlobal: Couldn't get fp registers: "
888888
<< strerror(errno);
@@ -1109,7 +1109,7 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
11091109
case SIGSEGV: {
11101110
{
11111111
errno = 0;
1112-
struct user_regs_struct regs {};
1112+
struct user_regs_struct regs{};
11131113
if (ptrace(PTRACE_GETREGS, newpid, nullptr, &regs) < 0) {
11141114
LOG(ERROR) << "SIGSEGV handling: failed to read registers"
11151115
<< strerror(errno);
@@ -1175,8 +1175,8 @@ OIDebugger::processTrapRet OIDebugger::processTrap(pid_t pid,
11751175
* entry/return point vectoring. We therefore must be able to match
11761176
* which interrupt this is for and act accordingly.
11771177
*/
1178-
struct user_regs_struct regs {};
1179-
struct user_fpregs_struct fpregs {};
1178+
struct user_regs_struct regs{};
1179+
struct user_fpregs_struct fpregs{};
11801180

11811181
errno = 0;
11821182
if (ptrace(PTRACE_GETREGS, newpid, nullptr, &regs) < 0) {
@@ -1599,15 +1599,15 @@ std::optional<typename Sys::RetType> OIDebugger::remoteSyscall(Args... _args) {
15991599

16001600
/* Saving current registers states */
16011601
errno = 0;
1602-
struct user_regs_struct oldregs {};
1602+
struct user_regs_struct oldregs{};
16031603
if (ptrace(PTRACE_GETREGS, traceePid, nullptr, &oldregs) < 0) {
16041604
LOG(ERROR) << "syscall: GETREGS failed for process " << traceePid << ": "
16051605
<< strerror(errno);
16061606
return std::nullopt;
16071607
}
16081608

16091609
errno = 0;
1610-
struct user_fpregs_struct oldfpregs {};
1610+
struct user_fpregs_struct oldfpregs{};
16111611
if (ptrace(PTRACE_GETFPREGS, traceePid, nullptr, &oldfpregs) < 0) {
16121612
LOG(ERROR) << "syscall: GETFPREGS failed for process " << traceePid << ": "
16131613
<< strerror(errno);
@@ -2485,7 +2485,7 @@ void OIDebugger::restoreState(void) {
24852485
continue;
24862486
}
24872487

2488-
struct user_regs_struct regs {};
2488+
struct user_regs_struct regs{};
24892489

24902490
/* Find the trapInfo for this tgid */
24912491
if (auto iter{threadTrapState.find(p)};
@@ -2495,7 +2495,7 @@ void OIDebugger::restoreState(void) {
24952495
/* Paranoia really */
24962496
assert(p == iter->first);
24972497

2498-
struct user_fpregs_struct fpregs {};
2498+
struct user_fpregs_struct fpregs{};
24992499

25002500
if (VLOG_IS_ON(1)) {
25012501
errno = 0;
@@ -2573,7 +2573,7 @@ void OIDebugger::restoreState(void) {
25732573

25742574
if (VLOG_IS_ON(1)) {
25752575
errno = 0;
2576-
struct user_regs_struct regs {};
2576+
struct user_regs_struct regs{};
25772577
if (ptrace(PTRACE_GETREGS, p, NULL, &regs) < 0) {
25782578
LOG(ERROR) << "restoreState unknown sig handling: getregs failed- "
25792579
<< strerror(errno);
@@ -2708,7 +2708,7 @@ bool OIDebugger::stopTarget(void) {
27082708

27092709
if (VLOG_IS_ON(1)) {
27102710
errno = 0;
2711-
struct user_regs_struct stopregs {};
2711+
struct user_regs_struct stopregs{};
27122712
if (ptrace(PTRACE_GETREGS, traceePid, NULL, &stopregs) < 0) {
27132713
LOG(ERROR) << "stopTarget getregs failed for process " << traceePid
27142714
<< " : " << strerror(errno);

oi/SymbolService.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <algorithm>
2121
#include <boost/scope_exit.hpp>
2222
#include <cassert>
23+
#include <cinttypes>
2324
#include <cstring>
2425
#include <fstream>
2526

@@ -772,7 +773,7 @@ std::shared_ptr<GlobalDesc> SymbolService::findGlobalDesc(
772773

773774
auto gd = std::make_shared<GlobalDesc>(global, sym->addr);
774775

775-
struct drgn_object globalObj {};
776+
struct drgn_object globalObj{};
776777
drgn_object_init(&globalObj, drgnProg);
777778
BOOST_SCOPE_EXIT_ALL(&) {
778779
drgn_object_deinit(&globalObj);

test/integration/folly_shims.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ namespace detail {
3232
void F14LinkCheck<getF14IntrinsicsMode()>::check() noexcept {
3333
}
3434

35-
#if FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE
36-
EmptyTagVectorType kEmptyTagVector = {};
37-
#endif
38-
3935
bool tlsPendingSafeInserts(std::ptrdiff_t /*delta*/) {
4036
/* Disable extra debugging re-hash by classifying all inserts as safe (return
4137
* true) */

tools/config_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def pull_base_toml() -> typing.Dict:
172172
# Now, we need to replace any placeholders that might be present in the base toml file with the real verisons.
173173
user = getpass.getuser()
174174
if "IN_NIX_SHELL" in os.environ and "src" in os.environ:
175-
pwd = os.environ['src']
175+
pwd = os.environ["src"]
176176
else:
177177
pwd = str(repo_path.resolve())
178178

0 commit comments

Comments
 (0)