facebook / facebook/folly

Build fails: error: comparison between pointer and integer ('ElfAddr' (aka 'unsigned long') and 'caddr_t' (aka 'char *'))

Open
#2,502 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

```
/wrkdirs/usr/ports/devel/folly/work/folly-2025.09.15.00/folly/debugging/symbolizer/Symbolizer.cpp:353:35: error: comparison between pointer and integer ('ElfAddr' (aka 'unsigned long') and 'caddr_t' (aka 'char *'))
353 | auto const adjusted = eaddr < maddr ? ~ElfAddr(0) : eaddr - maddr;
| ~~~~~ ^ ~~~~~
/wrkdirs/usr/ports/devel/folly/work/folly-2025.09.15.00/folly/debugging/symbolizer/Symbolizer.cpp:353:65: error: invalid operands to binary expression ('const ElfAddr' (aka 'const unsigned long') and 'const caddr_t' (aka 'char *const'))
353 | auto const adjusted = eaddr < maddr ? ~ElfAddr(0) : eaddr - maddr;
| ~~~~~ ^ ~~~~~
```

Version: 2025.09.15.00
clang-19
FreeBSD 14.3

Contributor guide

Open the contributing guide

Research direction

Start with folly/debugging/symbolizer/Symbolizer.cpp at line 353 and inspect the declarations and surrounding uses of ElfAddr and caddr_t. Reproduce the build with clang-19 on FreeBSD 14.3; done means folly builds successfully without the reported comparison and arithmetic errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.