nouveau mme_builder is broken with ubsan
Building with -D b_sanitize=undefined
and running the unit tests:
Running main() from ../src/gtest/src/gtest_main.cc
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from mme_builder_test
[ RUN ] mme_builder_test.sanity
/usr/include/c++/12/bits/stl_vector.h:1143:34: runtime error: reference binding to null pointer of type 'const value_type'
#0 0x557a3ca1fed2 in std::vector<unsigned int, std::allocator<unsigned int> >::operator[](unsigned long) const /usr/include/c++/12/bits/stl_vector.h:1143
#1 0x557a3ca1eb50 in mme_fermi_sim_runner::run_macro(std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<unsigned int, std::allocator<unsigned int> > const&) ../src/nouveau/mme/tests/mme_runner.cpp:263
#2 0x557a3ca26c2f in mme_builder_test_sanity_Test::TestBody() ../src/nouveau/mme/tests/mme_builder_test.cpp:55
#3 0x557a3caf7331 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2621
#4 0x557a3cadaed3 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2657
#5 0x557a3ca7dee1 in testing::Test::Run() ../src/gtest/src/gtest.cc:2696
#6 0x557a3ca80d91 in testing::TestInfo::Run() ../src/gtest/src/gtest.cc:2845
#7 0x557a3ca84a88 in testing::TestSuite::Run() ../src/gtest/src/gtest.cc:3004
#8 0x557a3cab63cf in testing::internal::UnitTestImpl::RunAllTests() ../src/gtest/src/gtest.cc:5890
#9 0x557a3cafabd6 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2621
#10 0x557a3cadefaf in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2657
#11 0x557a3caab7fe in testing::UnitTest::Run() ../src/gtest/src/gtest.cc:5455
#12 0x557a3cb339af in RUN_ALL_TESTS() ../src/gtest/include/gtest/gtest.h:2314
#13 0x557a3cb339fa in main ../src/gtest/src/gtest_main.cc:63
#14 0x7f0b8109a1c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#15 0x7f0b8109a284 in __libc_start_main_impl ../csu/libc-start.c:360
#16 0x557a3c808400 in _start (/builds/mesa/mesa/_build/src/nouveau/mme/mme_builder_test+0x352400)
Edited by Eric Engestrom