Fixed SIGSEGV

This commit is contained in:
deeaitch committed 2026-10-23 21:04:43 -04:00
1 parent f03882d3f4
commit 5b0019d50d
50 files changed
+1565 -821

No files matched your search

+25 -2
View File
@@ -40,14 +40,15 @@ make
make check
```
`parser_tests.pri` and `decoder_tests.pri` include the original test sources;
`parser_tests.pri` includes `dbc_parser_test.cpp` and `dbc_statement_test.cpp`;
`decoder_tests.pri` includes the decoder test source;
`tests.pro` also includes `dbc_coverage_test.cpp`, `dbc_lifetime_test.cpp`,
`dbc_validation_test.cpp`, and `dbc_pipeline_test.cpp`.
`../core/core.pri` supplies the library include path and linkage.
## Local regression checks
`run_core_ci.sh` builds the core archive, runs all six QtTest suites and the
`run_core_ci.sh` builds the core archive, runs all seven QtTest suites and the
qmake tree target with `make check`, then compiles and runs the standalone C++17
tree/builder test without Qt. A failed command returns a nonzero status. The
`sanitize` mode applies ASan/UBSan flags to core, tests, and the standalone
@@ -295,6 +296,28 @@ Attribute changes were verified with `qmake6 ../dbc.pro`, `make -j4`, and
passed. The standalone C++17 tree test also passed. The existing named
comma-decimal C locale test skipped because the locale is not installed.
## Long value descriptions and multiplex ranges
`dbc_statement_test.cpp` adds a separate `StatementParserTest` suite to the
existing parser qmake source list and the main test runner. Both parser APIs are
checked with 50,000-character descriptions (including quotes, backslashes,
semicolons, and spaces), 10,000 `VAL_` pairs, 10,000 multiplex ranges, and long
numeric bounds and whitespace. Valid metadata must survive parsing without
truncation, support value-description lookup after decoding, and activate or
skip multiplex branches correctly. Statements may precede or follow definitions.
Malformed long statements cover incomplete quotes/escapes, invalid escapes,
missing separators and semicolons, duplicate keys, numeric overflow, empty and
reversed ranges, trailing text, and unresolved long names. The diagnostic API
must return an empty database with the correct category, path, and source line;
the throwing API must report that same location.
Verified with Qt 6.8.2 in separate Release and ASan/UBSan builds with
`CONFIG+=dbc_qt`: each passed 2,449 core QtTest checks (including 29 checks in the
new suite), seven model checks, and the qmake tree test. One named-locale case
skipped because the locale is unavailable. Sanitizer errors were fatal; local
leak checking used `detect_leaks=0` because of the documented ptrace restriction.
## Unsupported signal value types
`unsupportedSignalValueTypes` verifies that both parser APIs reject `SIG_VALTYPE_`