[cfe-dev] Seeing "`!HitMapping && "recursive macro expansion?"' assertion failure -- hoping for hints on cause

Chris Hamilton via cfe-dev cfe-dev at lists.llvm.org
Tue Nov 19 13:37:38 PST 2019


Hi folks (especially Ilya Biryukov),

 

I'm working with clangd under the Theia IDE, and while browsing source, I'm
regularly seeing this assertion failure from clangd:

 

root ERROR C/C++: clangd:
/repo/eahcmrh/flexc-llvm-project/clang/lib/Tooling/Syntax/Tokens.cpp:473:
void
clang::syntax::TokenCollector::Builder::consumeMapping(clang::syntax::TokenB
uffer::MarkedFile&, unsigned int, unsigned int, unsigned int, unsigned
int&): Assertion `!HitMapping && "recursive macro expansion?"' failed.

 

Outside of working on some clang-tidy checks, I've had very little
experience with clang front-end code, and I'm struggling to root cause this.
Ilya, the assertion is coming from code you added about 5 months ago, so I'm
hoping you might have some suggestions about what might cause this error,
given that it is cropping up in unmodified source files that are known to
compile.

 

I'm working on trying to extract some non-proprietary code that triggers the
failure - if I'm able, I'll file a bug for it.   Regardless of whether I
file a bug, I'd like to root-cause this and perhaps even identify a fix,
because it is blocking some folks in my team from making progress on other
objectives.   I'd be grateful for any suggestions on where to look to narrow
this down..

 

Thanks,

Chris

 

 <https://www.ericsson.com/> 

 

Chris Hamilton 

Compiler Developer

 

Developer

BNEW DNEW 4G5G BI BBI 10

Mobile: +15125673298

chris.hamilton at ericsson.com

 

Ericsson

1703 W. 5th Street Suite 600

78703,Austin, Texas

United States

 <https://www.ericsson.com/> ericsson.com

 

 <https://www.ericsson.com/current_campaign> 

 

Our commitment to
<https://www.ericsson.com/thecompany/sustainability-corporateresponsibility>
Technology for Good and
<https://www.ericsson.com/thecompany/diversity-inclusion> Diversity and
Inclusion contributes to positive change.
Follow us on:  <https://www.facebook.com/ericsson> Facebook
<https://www.linkedin.com/company/ericsson> LinkedIn
<https://twitter.com/Ericsson> Twitter

Legal entity:ERICSSON AB registration number 556056-6258, registered office
in Stockholm.
This communication is confidential. Our email terms:
<https://www.ericsson.com/en/legal/privacy/email-disclaimer>
www.ericsson.com/en/legal/privacy/email-disclaimer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191119/a2b4d72a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191119/a2b4d72a/attachment.bin>


More information about the cfe-dev mailing list