[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 07:16:13 PST 2022


jansvoboda11 added a comment.

In D116750#3240363 <https://reviews.llvm.org/D116750#3240363>, @carlosgalvezp wrote:

> Hi @jansvoboda11 !
>
> I believe this commit is the root cause of this issue: https://github.com/llvm/llvm-project/issues/53161
>
> Believe it or not, I was (un)lucky enough to run into it. I have bisected the repo and my tests indicate that this commit is the offender. Do you have any obvious idea what could be the problem?
>
> I'm suspecting this is the offender, since it's related to `#include_next` which is where I get the error:
> https://github.com/llvm/llvm-project/commit/8503c688d555014b88849e933bf096035a351586#diff-fb96fa41fef79b66ab53ac1d845ab467defc41c2639e9b0cd60b471b04f898cdR981
> To summarize, clang cannot find `/usr/include` only if I include exactly 511 directories via `-I`. If I include 510 or 512, then it works fine. I will test if the same happens with smaller powers of two. I have a test script that I can share if you want to test it yourself.
>
> EDIT: the same happen when including exactly 255 directories. It does not happen for 127 and below. It does happen for 1023 and above.

Hi, thanks for reporting this. The reproducer script would be helpful. Looking at the code, I don't see anything obviously wrong.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116750



More information about the cfe-commits mailing list