Issue 238994
Summary [compiler-rt] scudo: error: use of undeclared identifier 'mallopt', 'malloc_info', 'mallinfo'
Labels new issue
Assignees
Reporter peppergrayxyz
    building on Gentoo musl/llvm fails with errors:

```C
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:597:13: error: use of undeclared identifier 'mallopt'
  597 | EXPECT_EQ(mallopt(-1000, 1), 0);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:601:13: error: use of undeclared identifier 'mallopt'
  601 | EXPECT_EQ(mallopt(M_PURGE, 0), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:603:13: error: use of undeclared identifier 'mallopt'
  603 | EXPECT_EQ(mallopt(M_DECAY_TIME, 1), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:604:13: error: use of undeclared identifier 'mallopt'
  604 | EXPECT_EQ(mallopt(M_DECAY_TIME, 0), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:605:13: error: use of undeclared identifier 'mallopt'
  605 | EXPECT_EQ(mallopt(M_DECAY_TIME, 1), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:606:13: error: use of undeclared identifier 'mallopt'
  606 | EXPECT_EQ(mallopt(M_DECAY_TIME, 0), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:609:15: error: use of undeclared identifier 'mallopt'
  609 | EXPECT_EQ(mallopt(M_CACHE_COUNT_MAX, 100), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:610:15: error: use of undeclared identifier 'mallopt'
  610 | EXPECT_EQ(mallopt(M_CACHE_SIZE_MAX, 1024 * 1024 * 2), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:611:15: error: use of undeclared identifier 'mallopt'
  611 | EXPECT_EQ(mallopt(M_TSDS_COUNT_MAX, 10), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:612:15: error: use of undeclared identifier 'mallopt'
  612 | EXPECT_EQ(mallopt(M_CACHE_RESIDENT_BYTES_MAX, 1024 * 1024 * 14), 1);
      | ^~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:784:13: error: use of undeclared identifier 'malloc_info'
  784 | EXPECT_EQ(malloc_info(0, F), 0);
      | ^~~~~~~~~~~
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:650:24: error: implicit instantiation of undefined member 'mallinfo'
  650 | struct mallinfo MI = mallinfo();
      | ^
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:670:3: note: in instantiation of function template specialization 'MallInfoTest<int>' requested here
  670 |   MallInfoTest<int>();
      | ^
llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:650:10: note: member is declared here
  650 |   struct mallinfo MI = mallinfo();
 |          ^
12 errors generated.
```

due to missing symbols in `malloc.h` on musl.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to