abseil / abseil/abseil-cpp

[Bug]: segmentation fault due to constexpr constructor of absl::flags_internal::Flag

Đang mở
#1,821 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
18.1k
Fork
3.2k
Merge trung bình
20 giờ 36 phút
Pull request đã merge (30 ngày)
1

Mô tả

### Describe the issue

When I used abseil-cpp with other libraries like [libtorch](https://download.pytorch.org/libtorch/cu126/libtorch-cxx11-abi-shared-with-deps-2.6.0%2Bcu126.zip), I got `segmentation fault` at `FlagRegistry::RegisterFlag`. I solved this issue by removing the `constexpr` keyword from the constructor of `absl::flags_internal::Flag`.

### Steps to reproduce the problem

- create a main.cpp with a blank main function.
- compile main.cpp into an executable and link libtorch and abseil-cpp to it.
- run the executable, a segmentation fault will occur.

### What version of Abseil are you using?

20240722.1

### What operating system and version are you using?

ArchLinux, kernel version: Linux 6.13.1

### What compiler and version are you using?

I tried both GCC13 and GCC14 with C++17.

### What build system are you using?

cmake 3.30

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.