Open
Description
Goals
As a end-user of SimEng, I wish to build SimEng and pass regression tests before installing it. So that I can trust my installation
Issue
"unit_tests" have a "SEGMENTATION FAULT" when executed.
From shell when running :
cmake --build $SIMENG_BUILD_DIR --target test
Start 1: unit_tests │
1/4 Test #1: unit_tests .......................***Exception: SegFault 0.68 sec
When looking in the LastTest.log we have this :
[ RUN ] PipelineFetchUnitTests/PipelineFetchUnitTest.invalidMinBytesreadsDontComplete/0
GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: getMaxInstructionSize()
Returns: '\0'
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning default value.
Function call: getMaxInstructionSize()
Returns: '\0'
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: clearCompletedReads()
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See https://github.com/google/googletest/blob/master/docs/gmock_cook_book.md#knowing-when-to-expect for details.
<end of output>
Test time = 0.68 sec
Investigation Leads
Seg fault occurs in the test at "invalidMinBytesreadsDontComplete"
lib/SimEng/test/unit/pipeline/FetchUnitTest.cc:673
No information on the Seg fault in the trace but if we remove that test, all unit-tests pass.
Reproduction
Try to build SimEng with :
- State of the git : tag 0.9.6
- CentOS 7
- cmake version 3.21.4
- gcc 7.5.0
- LLVM precompiled version 14.0.5
- Commands to compile and run test before installation :
mkdir -p $SIMENG_BUILD_DIR
cmake -B $SIMENG_BUILD_DIR -S $SIMENG_SRC_DIR -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$SIMENG_HOME -DSIMENG_ENABLE_TESTS=ON -DSIMENG_USE_EXTERNAL_LLVM=ON -DLLVM_DIR=$LLVM_DIR
cmake --build $SIMENG_BUILD_DIR -j{nproc}
cmake --build $SIMENG_BUILD_DIR --target test
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
ToDo