[gdal-dev] gdal git - Test 28 test-virtual-memory (SEGFAULT)

Andrew C Aitchison andrew at aitchison.me.uk
Thu Jan 12 09:34:24 PST 2023


git master sources from today, on Ubuntu 21/10.

With Ubuntu clang version 15.0.2-1 there is one failure that
is not present in my g++ (Ubuntu 12.2.0-3ubuntu1) build:
 	28 - test-virtual-memory (SEGFAULT)

Here is a section of the "make test" output, followed by
     autotest/cpp/testvirtualmem
and
     gdb autotest/cpp/testvirtualmem
runs.

28/51 Testing: test-virtual-memory
28/51 Test: test-virtual-memory
Command: "/home/werdna/git/gdal.build./autotest/cpp/testvirtualmem"
Directory: /home/werdna/git/gdal.build./autotest/cpp
Output:
----------------------------------------------------------
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from testvitualmem
[ RUN      ] testvitualmem.test
ERROR 1: CPLVirtualMemManagerThread: trying to write into read-only mapping
<end of output>
----------------------------------------------------------
Test Failed.
----------------------------------------------------------


*******************************


# autotest/cpp/testvirtualmem
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from testvitualmem
[ RUN      ] testvitualmem.test
Physical memory : 16645120000 bytes
Testing CPLVirtualMemFileMapNew()
test_two_pages()
test_raw_auto(format=EHDR, bFileMapping=1)
test_raw_auto(format=EHDR, bFileMapping=0)
ERROR 1: CPLVirtualMemManagerThread: trying to write into read-only mapping
Segmentation fault (core dumped)


*******************************


# gdb autotest/cpp/testvirtualmem
Starting program: /home/werdna/git/gdal.build.llvm/autotest/cpp/testvirtualmem

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from testvitualmem
[ RUN      ] testvitualmem.test
Physical memory : 16645120000 bytes
Testing CPLVirtualMemFileMapNew()
[New Thread 0x7fffec1ff6c0 (LWP 2288144)]
test_two_pages()
[New Thread 0x7fffeb9fe6c0 (LWP 2288145)]

Thread 1 "testvirtualmem" received signal SIGSEGV, Segmentation fault.
0x000055555556291d in (anonymous namespace)::test_two_pages (ctxt=0x55555560dc10) at /home/werdna/git/gdal/autotest/cpp/testvirtualmem.cpp:133
133                 char val = addr[MINIMUM_PAGE_SIZE * (i % 3)];
(gdb) where
#0  0x000055555556291d in (anonymous namespace)::test_two_pages (ctxt=0x55555560dc10)
     at /home/werdna/git/gdal/autotest/cpp/testvirtualmem.cpp:133
#1  0x000055555556250e in (anonymous namespace)::testvitualmem_test_Test::TestBody (this=0x55555560bd10)
     at /home/werdna/git/gdal/autotest/cpp/testvirtualmem.cpp:266
#2  0x0000555555599d6f in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ()
#3  0x0000555555589f56 in testing::Test::Run() ()
#4  0x000055555558a115 in testing::TestInfo::Run() ()
#5  0x000055555558a6e9 in testing::TestSuite::Run() ()
#6  0x000055555558fbdf in testing::internal::UnitTestImpl::RunAllTests() ()
#7  0x000055555559a337 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ()
#8  0x000055555558a1d5 in testing::UnitTest::Run() ()
#9  0x0000555555566971 in RUN_ALL_TESTS () at /usr/include/gtest/gtest.h:2293
#10 0x0000555555566853 in main (argc=1, argv=0x55555560bc00) at /home/werdna/git/gdal/autotest/cpp/main_gtest.cpp:55


-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew at aitchison.me.uk



More information about the gdal-dev mailing list