[PATCH] D117922: InferFunctionAttrs: fix assertion on aligned_alloc

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 07:43:51 PST 2022


durin42 added a comment.

In D117922#3269532 <https://reviews.llvm.org/D117922#3269532>, @reames wrote:

> It seems rather suspect to have a test change to fix an assertion.  Either the IR is invalid - in which case the verifier should reject - or it's valid, and the pass can not crash.
>
> Patch rejected.
>
> p.s. Please provide detail on the assertion you're fixing.

As far as I can tell, this assertion was vacuous and never checked, presumably due to someone having replaced INACCESSIBLEMEMONLY_NOFREE_NOUNWIND with INACCESSIBLEMEMONLY_NOFREE_NOUNWIND_WILLRETURN and having missed one. Without this patch, the next change in the series doesn't notice the new allocalign() attribute that gets added to aligned_alloc (so it "spuriously" passes).

IOW: this was a buggy test before, and nobody noticed. I'm like 95% sure of that diagnosis.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117922/new/

https://reviews.llvm.org/D117922



More information about the llvm-commits mailing list