File tree 3 files changed +42
-0
lines changed
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,13 @@ build_abc() {
44
44
45
45
build_bitwuzla () {
46
46
pushd repos/bitwuzla
47
+ if [ " $GITHUB_MATRIX_OS " == ' ubuntu-20.04' ] ; then
48
+ # Ubuntu 20.04 uses an older version of glibc that is susceptible to
49
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909, so we must apply a
50
+ # crude workaround for it. Thankfully, this is not required for the version
51
+ # of glibc that ships with Ubuntu 22.04.
52
+ patch -p1 -i $PATCHES /bitwuzla-T58909-workaround.patch
53
+ fi
47
54
./configure.py
48
55
cd build
49
56
ninja -j4
Original file line number Diff line number Diff line change @@ -83,11 +83,15 @@ jobs:
83
83
- name : build_solver (non-Windows)
84
84
shell : bash
85
85
run : .github/ci.sh build_${{ matrix.solver }}
86
+ env :
87
+ GITHUB_MATRIX_OS : ${{ matrix.os }}
86
88
if : runner.os != 'Windows'
87
89
88
90
- name : build_solver (Windows)
89
91
shell : msys2 {0}
90
92
run : .github/ci.sh build_${{ matrix.solver }}
93
+ env :
94
+ GITHUB_MATRIX_OS : ${{ matrix.os }}
91
95
if : runner.os == 'Windows'
92
96
93
97
- uses : actions/upload-artifact@v2
Original file line number Diff line number Diff line change
1
+ diff --git a/src/main/time_limit.cpp b/src/main/time_limit.cpp
2
+ index 45238be4..f1ee25cb 100644
3
+ --- a/src/main/time_limit.cpp
4
+ +++ b/src/main/time_limit.cpp
5
+ @@ -6,6 +6,7 @@
6
+ #include <cstdlib>
7
+ #include <iostream>
8
+ #include <thread>
9
+ + #include <pthread.h>
10
+
11
+ namespace bzla::main {
12
+
13
+ @@ -15,6 +16,18 @@ std::condition_variable cv;
14
+ std::mutex cv_m;
15
+ bool time_limit_set = false;
16
+
17
+ + // Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909
18
+ + // on old versions of glibc
19
+ + void pthread_cond_bug() {
20
+ + pthread_cond_signal((pthread_cond_t *) nullptr);
21
+ + pthread_cond_init((pthread_cond_t *) nullptr,
22
+ + (const pthread_condattr_t *) nullptr);
23
+ + pthread_cond_destroy((pthread_cond_t *) nullptr);
24
+ + pthread_cond_timedwait((pthread_cond_t *) nullptr, (pthread_mutex_t *)
25
+ + nullptr, (const struct timespec *) nullptr);
26
+ + pthread_cond_wait((pthread_cond_t *) nullptr, (pthread_mutex_t *) nullptr);
27
+ + }
28
+ +
29
+ void
30
+ timeout_reached()
31
+ {
You can’t perform that action at this time.
0 commit comments