UBSan errors in GLSL compiler code
These are preventing us from expanding UBSan coverage much further:
../src/compiler/glsl/ir_hv_accept.cpp:52:4: runtime error: downcast of address 0x5644ec5f1fb8 which does not point to an object of type 'ir_instruction'
0x5644ec5f1fb8: note: object has invalid vptr
44 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 2a 5f ec 44 56 00 00 00 20 5f ec
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
#0 0x5644e997a5ca in visit_list_elements(ir_hierarchical_visitor*, exec_list*, bool) ../src/compiler/glsl/ir_hv_accept.cpp:52
#1 0x5644e97cc700 in array_refcount_test_do_not_process_vector_indexing_Test::TestBody() ../src/compiler/glsl/tests/array_refcount_test.cpp:424
#2 0x5644e9ff008f in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2402
#3 0x5644e9fdc1c3 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2438
#4 0x5644e9f82f5b in testing::Test::Run() ../src/gtest/src/gtest.cc:2474
#5 0x5644e9f85634 in testing::TestInfo::Run() ../src/gtest/src/gtest.cc:2656
#6 0x5644e9f87dc2 in testing::TestCase::Run() ../src/gtest/src/gtest.cc:2774
#7 0x5644e9fa379c in testing::internal::UnitTestImpl::RunAllTests() ../src/gtest/src/gtest.cc:4649
#8 0x5644e9ff3ca8 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2402
#9 0x5644e9fdfa71 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2438
#10 0x5644e9f9adbe in testing::UnitTest::Run() ../src/gtest/src/gtest.cc:4257
#11 0x5644ea018ac3 in RUN_ALL_TESTS() ../src/gtest/include/gtest/gtest.h:2233
#12 0x5644ea018983 in main ../src/gtest/src/gtest_main.cc:37
#13 0x7f62f2206bba in __libc_start_main ../csu/libc-start.c:308
#14 0x5644e97c5409 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/compiler/glsl/tests/general_ir_test+0x6e1409)
../src/compiler/glsl/ir.cpp:809:7: runtime error: downcast of address 0x7fff43f536b8 which does not point to an object of type 'ir_constant'
0x7fff43f536b8: note: object has invalid vptr
a7 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 98 2b 0f 83 a7 55 00 00 10 37 f5 43
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
#0 0x55a781632b3a in ir_constant::ir_constant(glsl_type const*, exec_list*) ../src/compiler/glsl/ir.cpp:809
#1 0x55a781598cb1 in generate_array_data(void*, glsl_base_type, unsigned int, unsigned int, unsigned int, ir_constant*&) ../src/compiler/glsl/tests/uniform_initializer_utils.cpp:208
#2 0x55a7815618f3 in array_test ../src/compiler/glsl/tests/set_uniform_initializer_tests.cpp:327
#3 0x55a781561efd in set_uniform_initializer_int_array_uniform_Test::TestBody() ../src/compiler/glsl/tests/set_uniform_initializer_tests.cpp:339
#4 0x55a78172cabd in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2402
#5 0x55a781718749 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2438
#6 0x55a7816be1c7 in testing::Test::Run() ../src/gtest/src/gtest.cc:2474
#7 0x55a7816c08a0 in testing::TestInfo::Run() ../src/gtest/src/gtest.cc:2656
#8 0x55a7816c302e in testing::TestCase::Run() ../src/gtest/src/gtest.cc:2774
#9 0x55a7816dea08 in testing::internal::UnitTestImpl::RunAllTests() ../src/gtest/src/gtest.cc:4649
#10 0x55a7817306d6 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2402
#11 0x55a78171bff7 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2438
#12 0x55a7816d602a in testing::UnitTest::Run() ../src/gtest/src/gtest.cc:4257
#13 0x55a7817554f1 in RUN_ALL_TESTS() ../src/gtest/include/gtest/gtest.h:2233
#14 0x55a7817553b1 in main ../src/gtest/src/gtest_main.cc:37
#15 0x7fc49a653bba in __libc_start_main ../csu/libc-start.c:308
#16 0x55a781545fd9 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/compiler/glsl/tests/uniform_initializer_test+0x1acfd9)
../src/compiler/glsl/builtin_functions.cpp:4945:4: runtime error: downcast of address 0x559b926abb50 which does not point to an object of type 'ir_instruction'
0x559b926abb50: note: object has invalid vptr
9b 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 ba 6a 92 9b 55 00 00 01 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
#0 0x559b914dbe1a in call ../src/compiler/glsl/builtin_functions.cpp:4945
#1 0x559b91507dcb in _atomic_counter_op ../src/compiler/glsl/builtin_functions.cpp:7166
#2 0x559b914d3813 in create_builtins ../src/compiler/glsl/builtin_functions.cpp:3950
#3 0x559b9149fbd6 in initialize ../src/compiler/glsl/builtin_functions.cpp:1306
#4 0x559b9150f1af in _mesa_glsl_builtin_functions_init_or_ref ../src/compiler/glsl/builtin_functions.cpp:7673
#5 0x559b9147d2d6 in initialize_context ../src/compiler/glsl/standalone.cpp:137
#6 0x559b91481264 in standalone_compile_shader ../src/compiler/glsl/standalone.cpp:446
#7 0x559b9147ce80 in main ../src/compiler/glsl/main.cpp:97
#8 0x7f7b6da48bba in __libc_start_main ../csu/libc-start.c:308
#9 0x559b9147caf9 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/compiler/glsl/glsl_compiler+0x5fbaf9)
../src/compiler/glsl/s_expression.cpp:206:4: runtime error: downcast of address 0x563b36131640 which does not point to an object of type 's_expression'
0x563b36131640: note: object has invalid vptr
3b 56 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 18 13 36 3b 56 00 00 61 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
#0 0x563b352af1ad in s_match(s_expression*, unsigned int, s_pattern*, bool) ../src/compiler/glsl/s_expression.cpp:206
#1 0x563b3501e37a in read_function_sig ../src/compiler/glsl/ir_reader.cpp:233
#2 0x563b3501e182 in read_function ../src/compiler/glsl/ir_reader.cpp:214
#3 0x563b3501d781 in scan_for_prototypes ../src/compiler/glsl/ir_reader.cpp:182
#4 0x563b3501b8ed in read ../src/compiler/glsl/ir_reader.cpp:98
#5 0x563b3501b817 in _mesa_glsl_read_ir(_mesa_glsl_parse_state*, exec_list*, char const*, bool) ../src/compiler/glsl/ir_reader.cpp:84
#6 0x563b34c28fe8 in test_optpass(int, char**) ../src/compiler/glsl/test_optpass.cpp:215
#7 0x563b34c27ead in main ../src/compiler/glsl/test.cpp:71
#8 0x7fdf814d3bba in __libc_start_main ../csu/libc-start.c:308
#9 0x563b34c27b49 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/compiler/glsl/glsl_test+0x622b49)
/usr/include/c++/9/bits/stl_vector.h:1043:34: runtime error: reference binding to null pointer of type 'struct value_type'
#0 0x55eed68cd7d4 in std::vector<array_live_range, std::allocator<array_live_range> >::operator[](unsigned long) /usr/include/c++/9/bits/stl_vector.h:1043
#1 0x55eed68c3b88 in LifetimeEvaluatorTest::run(std::vector<FakeCodeline, std::allocator<FakeCodeline> > const&, bool&) ../src/mesa/state_tracker/tests/st_tests_common.cpp:522
#2 0x55eed68c3f5b in LifetimeEvaluatorTest::run(std::vector<FakeCodeline, std::allocator<FakeCodeline> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&) ../src/mesa/state_tracker/tests/st_tests_common.cpp:529
#3 0x55eed681cc47 in LifetimeEvaluatorExactTest_SimpleMoveAdd_Test::TestBody() ../src/mesa/state_tracker/tests/test_glsl_to_tgsi_lifetime.cpp:49
#4 0x55eed695feb7 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/mesa/state_tracker/tests/st_renumerate_test+0x1746eb7)
#5 0x55eed694bd8d in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/mesa/state_tracker/tests/st_renumerate_test+0x1732d8d)
#6 0x55eed68f23e5 in testing::Test::Run() ../src/gtest/src/gtest.cc:2474
#7 0x55eed68f4abe in testing::TestInfo::Run() ../src/gtest/src/gtest.cc:2656
#8 0x55eed68f724c in testing::TestCase::Run() ../src/gtest/src/gtest.cc:2774
#9 0x55eed6912c26 in testing::internal::UnitTestImpl::RunAllTests() ../src/gtest/src/gtest.cc:4649
#10 0x55eed69638a0 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2402
#11 0x55eed694f267 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2438
#12 0x55eed690a248 in testing::UnitTest::Run() ../src/gtest/src/gtest.cc:4257
#13 0x55eed69880eb in RUN_ALL_TESTS() ../src/gtest/include/gtest/gtest.h:2233
#14 0x55eed6987fab in main ../src/gtest/src/gtest_main.cc:37
#15 0x7fbbea55dbba in __libc_start_main ../csu/libc-start.c:308
#16 0x55eed681c409 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/mesa/state_tracker/tests/st_renumerate_test+0x1603409)