clang 15.0.7, ASAN+UBSAN (this is probably relevant because it passed under our CI with clang 12)
UB in test_sub_ntf
1/20 Test #13: test_sub_ntf .....................Subprocess aborted***Exception: 8.22 sec
[==========] Running 9 test(s).
[ RUN ] test_invalid_start_time
[ OK ] test_invalid_start_time
[ RUN ] test_invalid_stop_time
github/CESNET/Netopeer2/tests/test_sub_ntf.c:159:5: runtime error: member access within null pointer of type 'struct lyd_node'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior github/CESNET/Netopeer2/tests/test_sub_ntf.c:159:5 in
Test failed with exception: Segmentation fault(11)
The failure is within a macro, and upon closer examination, lyd_child(st->envp) is NULL, so trying to invoke LYD_NAME on top of that invokes undefined behavior.
wrong element name in test_subscribe_param
3/20 Test #8: test_subscribe_param .............Subprocess aborted***Exception: 8.64 sec
[==========] Running 11 test(s).
[ RUN ] test_stop_time_invalid
"<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<error-type>protocol</error-type>
<error-tag>bad-element</error-tag>
<error-severity>error</error-severity>
<error-message xml:lang="en">Specified "startTime" is in future.</error-message>
<error-info>
<bad-element>startTime</bad-element>
</error-info>
</rpc-error>
" != "<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<error-type>protocol</error-type>
<error-tag>bad-element</error-tag>
<error-severity>error</error-severity>
<error-message xml:lang="en">Specified "stopTime" is earlier than "startTime".</error-message>
<error-info>
<bad-element>stopTime</bad-element>
</error-info>
</rpc-error>
"
[ LINE ] --- /home/jkt/work/cesnet/gerrit/github/CESNET/Netopeer2/tests/test_subscribe_param.c:177: error: Failure!
wrong subscription-terminated notification (?) in test_yang_push_advanced
12/20 Test #17: test_yang_push_advanced ..........Subprocess aborted***Exception: 11.62 sec
[==========] Running 8 test(s).
[ RUN ] test_on_change_stop_time
0x8 != 0x1
[ LINE ] --- /home/jkt/work/cesnet/gerrit/github/CESNET/Netopeer2/tests/test_yang_push_advanced.c:138: error: Failure!
a same problem (?) in test_sub_ntf_advanced
15/20 Test #14: test_sub_ntf_advanced ............Subprocess aborted***Exception: 13.10 sec
[==========] Running 18 test(s).
[ RUN ] test_filter_pass
[ OK ] test_filter_pass
[ RUN ] test_filter_no_pass
[ OK ] test_filter_no_pass
[ RUN ] test_modifysub_filter
[ OK ] test_modifysub_filter
[ RUN ] test_modifysub_stop_time
0x8 != 0x1
[ LINE ] --- /home/jkt/work/cesnet/gerrit/github/CESNET/Netopeer2/tests/test_sub_ntf_advanced.c:253: error: Failure!
So yet another problem with DST, it had nothing to do with the compiler or the sanitizers. Should work with the latest libyang and I really hope it was the last time I had to fix this.
I'm getting these four failures with:
UB in
test_sub_ntf
The failure is within a macro, and upon closer examination,
lyd_child(st->envp)
isNULL
, so trying to invokeLYD_NAME
on top of that invokes undefined behavior.wrong element name in
test_subscribe_param
wrong
subscription-terminated
notification (?) intest_yang_push_advanced
a same problem (?) in
test_sub_ntf_advanced