Project

General

Profile

Bug #44015

Cant compile src/tools/rados/rados.cc on 32 bit systems

Added by Stefan Bischoff about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
rados tool
Pull request ID:
Crash signature:

Description

On my machine size_t is unsigned int. This causes an overflow in src/tools/rados/rados.cc:776: max_obj_len = 5ull * 1024ull * 1024ull * 1024ull;
max_obj_len should be uint64. it was uint64 but has been changed for some reason.

History

#1 Updated by Neha Ojha about 2 months ago

Following is the explanation for why it was done.

commit 8617ed065fac44dba44b9383b9ce2e3515a5bbda
Author: Kefu Chai <kchai@redhat.com>
Date:   Sun Nov 12 08:36:16 2017 +0800

    rados: use size_t for `max_obj_len`

    otherwise, on some platforms where size_t is not uint64_t, MacOS for
    instance, no matched generate_random_number() can be selected.

    Signed-off-by: Kefu Chai <kchai@redhat.com>

Also available in: Atom PDF