Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clang-format eats all the memory when formatting minilzo.c #53888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
belkiss opened this issue Feb 16, 2022 · 4 comments
Closed

Clang-format eats all the memory when formatting minilzo.c #53888

belkiss opened this issue Feb 16, 2022 · 4 comments
Labels
clang-format confirmed Verified by a second party

Comments

@belkiss
Copy link

belkiss commented Feb 16, 2022

Heya!

As said in the title, when trying to format the file minilzo.c that can be download here: http://www.oberhumer.com/opensource/lzo/#minilzo, clang-format starts eating up the memory, and never completes...

@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2022

@llvm/issue-subscribers-clang-format

@mkurdej
Copy link
Member

mkurdej commented Feb 16, 2022

Well, AFAIK, that's due to all the #ifs that clang-format processes branch by branch, every possible combination, which provokes exponential complexity :/.
To fix this, one probably needs to rework completely this part of clang-format...

BTW, the file lzodefs.h also takes ages and tons of memory. I haven't waited for it to end, but just taking about 200 lines (out of over 3200) takes over 6 seconds on my machine.

@mkurdej mkurdej added bug Indicates an unexpected problem or unintended behavior confirmed Verified by a second party labels Feb 16, 2022
@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2022

@llvm/issue-subscribers-bug

@owenca
Copy link
Contributor

owenca commented Feb 23, 2022

This may be a duplicate of #48863.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format confirmed Verified by a second party
Projects
None yet
Development

No branches or pull requests

5 participants