-
Notifications
You must be signed in to change notification settings - Fork 258
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
[BUG] clang-format crash #1880
Comments
the content of clang-format is as follows. ---
BasedOnStyle : Chromium
BinPackParameters : true
BinPackArguments: true
IndentWidth : 4
ColumnLimit : 110
AllowAllArgumentsOnNextLine : false
AllowShortFunctionsOnASingleLine: None
BreakBeforeBinaryOperators : NonAssignment
#IndentCaseLabels : false
AlignConsecutiveMacros : AcrossComments
AlignArrayOfStructures : Left
#AlignAfterOpenBracket: DontAlign
AlignAfterOpenBracket: Align
#IndentPPDirectives : BeforeHash
SeparateDefinitionBlocks: Always
IncludeBlocks : Regroup
SortIncludes: CaseSensitive
SortUsingDeclarations: true
---
Language : Cpp
AccessModifierOffset : -4
BreakBeforeBraces : Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
IncludeCategories:
- Regex: '^"HLLNV[[:alnum:].]+'
Priority: 1
- Regex: '^"HLLLC[[:alnum:].]+'
Priority: 2
- Regex: '^"HLLME[[:alnum:].]+'
Priority: 3
- Regex: '<[[:alnum:].]+>'
Priority: 4
- Regex: '.*'
Priority: 5
SortPriority: 0
---
Language : Java |
Please name the exact SHA you used so this is reproducible even if we can't get to it before they change the file in a way that no longer causes a crash.
We need that too. |
Just use the latest version of AES.h. or update to the following commit. SergeyBel/AES@deafd37 I think the crash is caused by the long array. |
This doesn't reproduce in clang-r487747 in r26. If there's another point release for r25, we can respin the toolchain with the following fix identified by bisection:
|
Description
The AES.h is from https://github.com/SergeyBel/AES/blob/master/src/AES.h
ndk version is 25.2.9519653. clang-format is under ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang-format.
Crash happened when using the clang-format to format the AES.h.
clang-format --verbose --style=file:/Users/xxx/diff/clang-format --fallback-style=Chromium -i AES.h
Formatting [1/1] AES.h
PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace.
Stack dump:
0. Program arguments: clang-format --verbose --style=file:/Users/xxx/diff/clang-format --fallback-style=Chromium -i AES.h
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var
LLVM_SYMBOLIZER_PATH
to point to it):0 clang-format 0x0000000104f3b638 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 181012
1 clang-format 0x0000000104f3abac llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 178312
2 clang-format 0x0000000104f3bc54 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 182576
3 libsystem_platform.dylib 0x000000019de56a84 _sigtramp + 56
4 clang-format 0x0000000104fbb114 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 703984
5 clang-format 0x0000000104fbacec llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 702920
6 clang-format 0x0000000104fba26c llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 700232
7 clang-format 0x0000000104fb8bb0 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 694412
8 clang-format 0x0000000104fb7e18 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 690932
9 clang-format 0x0000000104f78478 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 430420
10 clang-format 0x0000000104f95028 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 548100
11 clang-format 0x0000000104f855d8 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 484020
12 clang-format 0x0000000104f72300 llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 405468
13 clang-format 0x0000000104f7293c llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long) + 407064
14 clang-format 0x0000000104eef1f0
15 clang-format 0x0000000104eee3b8
16 dyld 0x000000019dacff28 start + 2236
zsh: bus error clang-format --verbose --style=file:/Users/xxx/diff/clang-format -i
Affected versions
r25
Canary version
No response
Host OS
Mac
Host OS version
macOS 13.3.1
Affected ABIs
arm64-v8a
Build system
CMake
Other build system
No response
minSdkVersion
NDK 25.2.9519653
Device API level
No response
The text was updated successfully, but these errors were encountered: