Build fails with FOLLY_USE_JEMALLOC=OFF
- Dominant language
- C++
- Stars
- 30.5k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Description
```
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/ExceptionString.cpp:17:
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/ExceptionString.h:21:
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/FBString.h:44:
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:9: error: use of undeclared identifier 'mallocx'; did you mean 'malloc'?
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^~~~~~~
malloc
/usr/include/stdlib.h:106:7: note: 'malloc' declared here
void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1);
^
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/ExceptionString.cpp:17:
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/ExceptionString.h:21:
In file included from /disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/FBString.h:44:
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:9: warning: comparison of function 'malloc' equal to a null pointer is always false [-Wtautological-pointer-compare]
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^~~~~~~ ~~~~~~~
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:9: note: prefix with the address-of operator to silence this warning
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^
&
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:31: error: use of undeclared identifier 'rallocx'
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:53: error: use of undeclared identifier 'xallocx'
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:104:9: error: use of undeclared identifier 'sallocx'
sallocx == nullptr || dallocx == nullptr || sdallocx == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:104:31: error: use of undeclared identifier 'dallocx'
sallocx == nullptr || dallocx == nullptr || sdallocx == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:104:53: error: use of undeclared identifier 'sdallocx'
sallocx == nullptr || dallocx == nullptr || sdallocx == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:105:9: error: use of undeclared identifier 'nallocx'
nallocx == nullptr || mallctl == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:105:31: error: use of undeclared identifier 'mallctl'
nallocx == nullptr || mallctl == nullptr ||
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:106:9: error: use of undeclared identifier 'mallctlnametomib'
mallctlnametomib == nullptr || mallctlbymib == nullptr) {
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:106:40: error: use of undeclared identifier 'mallctlbymib'
mallctlnametomib == nullptr || mallctlbymib == nullptr) {
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:9: warning: comparison of function 'malloc' equal to a null pointer is always false [-Wtautological-pointer-compare]
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^~~~~~~ ~~~~~~~
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:103:9: note: prefix with the address-of operator to silence this warning
if (mallocx == nullptr || rallocx == nullptr || xallocx == nullptr ||
^
&
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:115:9: error: use of undeclared identifier 'mallctl'
if (mallctl(
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:180:9: error: use of undeclared identifier 'sdallocx'
sdallocx == nullptr || nallocx == nullptr) {
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:180:32: error: use of undeclared identifier 'nallocx'
sdallocx == nullptr || nallocx == nullptr) {
^
/disk-samsung/freebsd-ports/devel/folly/work/folly-2022.11.28.00/folly/memory/Malloc.h:338:13: error: use of undeclared identifier 'nallocx'; did you mean 'calloc'?
auto rv = nallocx(minSize, 0);
^~~~~~~
calloc
/usr/include/stdlib.h:98:7: note: 'calloc' declared here
void *calloc(size_t, size_t) __malloc_like __result_use_check
^
```
Version: 2022.11.28.00
clang-14
OS: FreeBSD 13.1
Contributor guide
Research direction
Start in folly/memory/Malloc.h and trace the code compiled when FOLLY_USE_JEMALLOC=OFF; compare its declarations and calls with the FreeBSD 13.1 and clang-14 build errors. Reproduce the failure using folly 2022.11.28.00 with that option disabled, then verify that the project builds without unresolved jemalloc symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100