[PATCH] D42731: [IR] - Make User construction exception safe

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 10:12:28 PST 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D42731#1010035, @kkretzsch wrote:

> Thanks Reid, I've updated the diff. 
>  Concerning tests, yes we will add some tests which will test those exceptional OOM situations. We are thinking to introduce special out-of-memory malfunction tests in the llvm test-suite, which will be able to provoke bad_alloc exceptions when the number of allocations hits a given threshold. By increasing this threshold you will be able to test the unwinding at all places where allocations occur.
>
> However since those tests can fail whenever someone adds code which is not bad_alloc-exception safe, we first have to discuss adding this new test-category with the llvm-dev community. That's why we didn't add tests in this change. But that will be our next step ...


I was imagining something more like a unit test that gets basic coverage of these codepaths when configured with LLVM_ENABLE_EXCEPTIONS, but in any case, I don't think it's a blocking issue.

> When you are ok with the latest diff, can you approve? I have commit rights now and can commit the diff myself.

Yes, looks good. Sorry for the delay, I was ill.


Repository:
  rL LLVM

https://reviews.llvm.org/D42731





More information about the llvm-commits mailing list