codyze
codyze copied to clipboard
Inconsistencies when using C-style code and the WPDS
See https://github.com/Fraunhofer-AISEC/codyze/tree/mk/wpdscstyle for a test case. This branch just takes the Botan cpp testcases and mimics the behavior for an imaginary C - API. The results should not differ, but they do.
There is a general problem with WPDS not correctly checking for an order rule to correct properly.
Neither the https://github.com/Fraunhofer-AISEC/codyze/blob/08d6ff7f6a861a087e52d691fdaabd71344dbf8f/src/test/java/de/fraunhofer/aisec/codyze/crymlin/WpdsTest.kt#L530 .c test nor the https://github.com/Fraunhofer-AISEC/codyze/blob/08d6ff7f6a861a087e52d691fdaabd71344dbf8f/src/test/java/de/fraunhofer/aisec/codyze/crymlin/WpdsTest.kt#L538 .cpp test fail besides missing the required finish()
call https://github.com/Fraunhofer-AISEC/codyze/blob/08d6ff7f6a861a087e52d691fdaabd71344dbf8f/src/test/resources/unittests/WPDS_c_cpp_style.mark#L28
Note: NFA works correctly.
@oxisto I checked 06320a3 with the cpp code as discussed and it's broken, too :(
@oxisto same with ba136fe
Possible fix: TypestateAnalysis.kt:277 (oxisto)