Page MenuHomePhabricator

[UBSAN] Fix UBSAN issue in test_bitcon_main.cpp
ClosedPublic

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

Details

Summary

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

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.