[Bug] Build fails on 32-bit platforms: overflow in expression; result is -64771072 with type 'long'

Đang mở
#449 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu với lib/ClientConfigurationImpl.h tại bộ khởi tạo operationTimeout ở dòng 33 và xem lại build log 32-bit của FreeBSD được liên kết. Xác minh bản sửa bằng cách build pulsar-client-cpp 3.6.0 trên nền tảng 32-bit và xác nhận rằng lỗi integer-overflow không còn xảy ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Search before asking
  • I searched in the issues and found nothing similar.
Version

3.6.0

Minimal reproduce step

build on 32-bit platform

What did you expect to see?

n/a

What did you see instead?
In file included from /wrkdirs/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.6.0/lib/ClientConfiguration.cc:22:
/wrkdirs/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.6.0/lib/ClientConfigurationImpl.h:33:65: error: overflow in expression; result is -64771072 with type 'long' [-Werror,-Winteger-overflow]
   33 |     std::chrono::nanoseconds operationTimeout{30L * 1000 * 1000 * 1000};
      |                                               ~~~~~~~~~~~~~~~~~~^~~~~~
/wrkdirs/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.6.0/lib/ClientConfigurationImpl.h:33:65: error: overflow in expression; result is -64771072 with type 'long' [-Werror,-Winteger-overflow]
   33 |     std::chrono::nanoseconds operationTimeout{30L * 1000 * 1000 * 1000};
      |                                               ~~~~~~~~~~~~~~~~~~^~~~~~
2 errors generated.
Anything else?

log

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Ngôn ngữ chính
C++
Star
72
Fork
93
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/pulsar-client-cpp

Tất cả issue của apache/pulsar-client-cpp

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.