[PATCH 1/2] cirrus: move to freebsd 12.4 to fix rsync-related test failures

0 views
Skip to first unread message

Rob Browning

unread,
May 28, 2023, 6:44:13 PM5/28/23
to bup-...@googlegroups.com
It looks like this failure was due to a broken rsync:

ld-elf.so.1: /usr/local/bin/rsync: Undefined symbol "locale_charset"

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---

Pushed to main.

.cirrus.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 77d74b081..c230c72c4 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -48,7 +48,7 @@ task:
task:
name: freebsd check
freebsd_instance:
- image: freebsd-12-2-release-amd64
+ image: freebsd-12-4-release-amd64
cpu: 4
memory: 4
script: |
--
2.39.2

Rob Browning

unread,
May 28, 2023, 6:44:14 PM5/28/23
to bup-...@googlegroups.com
Reverse the order of the check since we'd originally intended it to
guard the assignment to the uncached HashSplitter field (allowing a
simple assignment), meaning that it needs to check that any size_t
will fit in an off_t.

Thanks to Mark J Hewitt for reporting the problem, which appeared on a
32-bit system where, unsurprisingly, off_t was 8 and size_t was 4.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---

Pushed to main.

lib/bup/_hashsplit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/bup/_hashsplit.c b/lib/bup/_hashsplit.c
index 289509638..ade413181 100644
--- a/lib/bup/_hashsplit.c
+++ b/lib/bup/_hashsplit.c
@@ -383,7 +383,7 @@ static int HashSplitter_uncache(HashSplitter *self, int last)
size_t pages = len / page_size;

// now track where and how much to uncache
- off_t start = self->uncached; // see assumptions (off_t <= size_t)
+ off_t start = self->uncached; // see assumptions (size_t <= off_t)

// Check against overflow up front
size_t pgstart = self->uncached / page_size;
@@ -659,7 +659,7 @@ int hashsplit_init(void)
{
// Assumptions the rest of the code can depend on.
assert(sizeof(Py_ssize_t) <= sizeof(size_t));
- assert(sizeof(off_t) <= sizeof(size_t));
+ assert(sizeof(size_t) <= sizeof(off_t));
assert(CHAR_BIT == 8);
assert(sizeof(Py_ssize_t) <= sizeof(size_t));

--
2.39.2

Reply all
Reply to author
Forward
0 new messages