Compile error with gcc and ASAN
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
Attempt to compile against v2022.01.31.00 with gcc-8 and ASAN (`-fsanitize=address -fno-omit-frame-pointer`) results in the following error:
```
include/folly/lang/SafeAssert.h:51:45: error: ‘folly::detail::safe_assert_terminate_w{__folly_detail_safe_assert_arg}’ is not a constant expression
__folly_detail_safe_assert_arg};
^
```
Caused by line `constexpr ::folly::detail::safe_assert_terminate_w
__folly_detail_safe_assert_terminate_w{__folly_detail_safe_assert_arg};`
Use the following app to reproduce:
```
#include
int main() {
FOLLY_SAFE_DCHECK(true);
return 0;
}
```
Contributor guide
Research direction
Start with include/folly/lang/SafeAssert.h at line 51 and compile the minimal application from the issue using gcc-8 with -fsanitize=address and -fno-omit-frame-pointer. Done means the application compiles successfully against v2022.01.31.00 without the constant-expression error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100