Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893936 - >=sys-libs/compiler-rt-sanitizers-16.0.0_rc2: please unmask useflags on arm profiles
Summary: >=sys-libs/compiler-rt-sanitizers-16.0.0_rc2: please unmask useflags on arm p...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-11 09:15 UTC by tt_1
Modified: 2023-02-13 13:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info,6.13 KB, text/plain)
2023-02-11 09:15 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2023-02-11 09:15:15 UTC
Created attachment 850376 [details]
emerge --info

with USE="+clang" version 16.0.0_rc2, these masked useflags are now compiling on ARM: dfsan hwasan libfuzzer memprof msan safestack tsan shadowcallstack

non working: gwp-asan 

not tested: orc
Comment 1 tt_1 2023-02-11 09:48:18 UTC
If desired I can run tests on the native arm device, but need a few directions on how to run them.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-12 02:46:17 UTC
(In reply to tt_1 from comment #1)
> If desired I can run tests on the native arm device, but need a few
> directions on how to run them.

Does the test suite pass?

Do:
1. emerge -v1 --with-test-deps compiler-rt-sanitizers
2. FEATURES=test emerge -v1 compiler-rt-sanitizers
Comment 3 tt_1 2023-02-12 11:18:28 UTC
interesting, thank you for showing me how to test this package. 

it doesn't look good though, the build never made it to the test-phase but breaks when compiling a sort of bootstrap code for the tests: 

[57/61] cd /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt_build/lib/scudo/standalone/tests && /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt_build/lib/llvm/16/bin/clang -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -Wall -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/../third-party/unittest/googletest/include -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/../third-party/unittest/googletest -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/include -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wno-mismatched-new-delete -march=armv7-a -mfloat-abi=hard -c -o ScudoUnitTestsObjects.wrappers_c_test.cpp.armhf.o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
FAILED: lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_c_test.cpp.armhf.o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt_build/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_c_test.cpp.armhf.o 
cd /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt_build/lib/scudo/standalone/tests && /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt_build/lib/llvm/16/bin/clang -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -fomit-frame-pointer -Wall -Wno-unused-parameter -Wno-unknown-warning-option -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -g -Wno-covered-switch-default -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/../third-party/unittest/googletest/include -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/../third-party/unittest/googletest -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/include -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wno-mismatched-new-delete -march=armv7-a -mfloat-abi=hard -c -o ScudoUnitTestsObjects.wrappers_c_test.cpp.armhf.o /var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:223:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(-1000, 1), 0);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:227:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(M_PURGE, 0), 1);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:229:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(M_DECAY_TIME, 1), 1);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:230:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(M_DECAY_TIME, 0), 1);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:231:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(M_DECAY_TIME, 1), 1);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:232:13: error: use of undeclared identifier 'mallopt'
  EXPECT_EQ(mallopt(M_DECAY_TIME, 0), 1);
            ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:235:15: error: use of undeclared identifier 'mallopt'
    EXPECT_EQ(mallopt(M_CACHE_COUNT_MAX, 100), 1);
              ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:236:15: error: use of undeclared identifier 'mallopt'
    EXPECT_EQ(mallopt(M_CACHE_SIZE_MAX, 1024 * 1024 * 2), 1);
              ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:237:15: error: use of undeclared identifier 'mallopt'
    EXPECT_EQ(mallopt(M_TSDS_COUNT_MAX, 10), 1);
              ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:24: error: invalid use of incomplete type 'mallinfo'
  struct mallinfo MI = mallinfo();
                       ^~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:10: note: forward declaration of 'mallinfo'
  struct mallinfo MI = mallinfo();
         ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:19: error: variable has incomplete type 'struct mallinfo'
  struct mallinfo MI = mallinfo();
                  ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:10: note: forward declaration of 'mallinfo'
  struct mallinfo MI = mallinfo();
         ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:273:8: error: invalid use of incomplete type 'mallinfo'
  MI = mallinfo();
       ^~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:10: note: forward declaration of 'mallinfo'
  struct mallinfo MI = mallinfo();
         ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:278:8: error: invalid use of incomplete type 'mallinfo'
  MI = mallinfo();
       ^~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:269:10: note: forward declaration of 'mallinfo'
  struct mallinfo MI = mallinfo();
         ^
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-16.0.0_rc2/work/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp:384:13: error: use of undeclared identifier 'malloc_info'
  EXPECT_EQ(malloc_info(0, F), 0);
            ^
14 errors generated.
ninja: build stopped: subcommand failed.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-12 18:48:06 UTC
The masks are based on compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake [1].  Admittedly, I haven't updated them in a while but FWICS ARM32 still isn't listed for most of the targets you've listed.  I'll update the others.

[1] https://github.com/llvm/llvm-project/blob/main/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
Comment 5 Larry the Git Cow gentoo-dev 2023-02-12 18:59:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdace8a05274df38aced0935f6bdc437407ec59b

commit fdace8a05274df38aced0935f6bdc437407ec59b
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-02-12 18:58:18 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-02-12 18:58:18 +0000

    profiles: Unmask more sys-libs/compiler-rt-sanitizer flags on >=16
    
    Bug: https://bugs.gentoo.org/893936
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/arch/arm/package.use.mask   | 1 +
 profiles/arch/arm64/package.use.mask | 1 +
 profiles/arch/x86/package.use.mask   | 1 +
 3 files changed, 3 insertions(+)
Comment 6 tt_1 2023-02-13 13:29:07 UTC
Thanks for fixing up the mask, I guess this can be closed and I'll open a new bug report for the failure in bootstrapping the tests.