This appears to have all the same attributes as many other functions
in this file, and I think the use of INACCESSIBLEMEMONLY_NOFREE_NOUNWIND
instead of INACCESSIBLEMEMONLY_NOFREE_NOUNWIND_WILLRETURN was an
oversight that meant aligned_alloc's attributes were just going
unchecked. This patch corrects the test defect and now the attributes
inferred on aligned_alloc are actually validated, and the test still
passes.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
I'm very open to suggestions on how to reword the commit message here, BTW. I thought it was clear, but seems not. :(
The miscommunication here is that you meant "Fix a test-case to actually verify the behavior it was supposed to", whereas philip read it as "fixes an assert(...) failure"...by adjusting a test.
If you say so. I see no way to get the former from the patch description, but that's probably the problem.