Page MenuHomePhabricator

[UBSAN] Fix UBSAN issue in test_bitcon_main.cpp

Authored by Fabien on Tue, Jan 7, 18:10.



This diff fixes an UBSAN issue introduced in D4841:

  • It moves the master_test_suite_t reference to a variable;
  • It adds an exception for the root cause of the UBSAN failure

Note that for some reason, this error only occurs with Clang < 9.

Test Plan

Run the build-ubsan configuration on CI.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Tue, Jan 7, 18:10
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Jan 7, 18:10
jasonbcox accepted this revision.Tue, Jan 7, 18:14
This revision is now accepted and ready to land.Tue, Jan 7, 18:14
This revision was automatically updated to reflect the committed changes.