tests: Abort if malloc() fails during context cloning tests
Summary:
Found by the clang static analyzer.
This is the worst true positive that it found. I feel somewhat proud.
This is a backport of libsecp256k1 PR774
Test Plan:
ninja check-secp256k1
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D7596