Commit Graph

33145 Commits

Author SHA1 Message Date
Treehugger Robot
002769b04c Merge "Remove scripts that haven't yet been updated for python3." 2022-10-18 23:10:29 +00:00
Elliott Hughes
f8b9b91130 Remove scripts that haven't yet been updated for python3.
That seems like a sign none of these are used. (Two of them haven't been
touched since their initial import in 2009!)

Test: treehugger
Change-Id: I76042f6c8fab84669c83aa72cd0b5df13f01ed7c
2022-10-18 21:41:59 +00:00
Treehugger Robot
c3f6fcabf1 Merge "[clang-tools] Symlink lib -> lib64 in prebuilts/clang-tools" 2022-10-18 18:48:28 +00:00
Pirama Arumuga Nainar
59eac68f50 [clang-tools] Symlink lib -> lib64 in prebuilts/clang-tools
Bug: http://b/241011085

Create symlink lib -> lib64 as toolchain libraries have a RUNPATH pointing
to $ORIGIN/../lib instead of lib64

Test: presubmit with new clang-tools prebuilts
Change-Id: I90973fc756b9489a16a0837473b86e728f50d8e0
2022-10-18 16:39:07 +00:00
Chih-hung Hsieh
2a2efc7cf0 Merge "Update clang-tools build to clang-r468909" 2022-10-18 04:02:14 +00:00
Chih-Hung Hsieh
21b04bc844 Update clang-tools build to clang-r468909
Bug: 241011085
Test: presubmit
Change-Id: I969239931c07dd97ce0259a3766ae93d68b21927
2022-10-17 23:45:22 +00:00
Treehugger Robot
eb8582344b Merge "Fix errorprone warnings that should be errors" 2022-10-17 16:03:16 +00:00
Cole Faust
a54b856e8d Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: Ic7e78cc74523ee09c1b4aa9969756f0cfd609e08
2022-10-15 21:33:28 -07:00
Christopher Ferris
7fa99882d8 Merge "Remove obsolete script." 2022-10-14 19:03:38 +00:00
Treehugger Robot
1d2edd2cd2 Merge "Fix the comparison of opaque types that have multiple definitions" 2022-10-14 09:33:04 +00:00
Hsin-Yi Chen
959646a857 Fix the comparison of opaque types that have multiple definitions
The types defined in more than one source file are identified with
"#ODR:" and the source paths. The paths can be in intermediate
directories and differ between build targets. They cause ABI check
failure on opaque types. This commit fixes the bug by removing the
suffixes before the comparison.

Test: make libcamera2ndk
Bug: 253095767
Change-Id: I79e6e843460c981afcf2ce0e0d2ad9335d0b3e90
2022-10-14 14:33:00 +08:00
Christopher Ferris
99d580a123 Remove obsolete script.
In addition, remove the test for it and the test file.

Test: NA
Change-Id: Ib5124749c523177805f494d9a6daf2400b6fc84c
2022-10-13 16:38:34 -07:00
Cole Faust
0bd20974dd Merge "Dist the module-lib and system-server lint databases" 2022-10-12 22:49:06 +00:00
Treehugger Robot
9a0d8d75f0 Merge "Add riscv binary recognition in gdb script" 2022-10-12 18:04:03 +00:00
Xia Lifang
8d2ff19bc3 Add riscv binary recognition in gdb script
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Change-Id: I61793c3c1e32828ac4196a20f85b4fe2832c4992
2022-10-12 19:36:09 +08:00
Inseob Kim
d9150d3841 Merge "gdbrunner: Make sure remote lldb-server has +x" 2022-10-12 01:53:25 +00:00
Inseob Kim
7b29d05387 gdbrunner: Make sure remote lldb-server has +x
Because 'adb push' often misses the executable permission, lldbserver
can fail without any meaningful error messages. This may happen when the
users are on Windows. To fix that, explicitly chmod remote lldbserver
after push.

Bug: 185210505
Test: manual
Change-Id: I88defd4905a9b902424ae8ef4b38a16932b31f02
2022-10-12 09:40:14 +09:00
Treehugger Robot
1caa406e30 Merge "Fix the comparison between opaque parameters" 2022-10-07 02:07:49 +00:00
Cole Faust
d01c3b26d1 Dist the module-lib and system-server lint databases
So that they can be downloaded to prebuilts/sdk.

Bug: 193460475
Test: m sdk dist
Change-Id: I0018256221c994b1b7070bab13a45e5067df1c2a
2022-10-06 13:40:11 -07:00
Hsin-Yi Chen
5cc255dee6 Fix the comparison between opaque parameters
Function parameters can be opaque and have no size information. For
example, __va_list in AArch64 ABI. header-abi-diff considers opaque
types compatible if their mangled names are the same.

The mangled name of __va_list can be _ZTI9__va_list or _ZTISt9__va_list.
They are also compatible.

Test: ./test.py
Bug: 248418092
Change-Id: I812abcabb620301eb575c54c7e3d2ff63dade488
2022-10-06 15:46:16 +08:00
Inseob Kim
f6e13d426b Merge "Add overrides support for snapshots" 2022-10-05 23:43:00 +00:00
Hsin-Yi Chen
acccadc399 Merge "Simplify the error message for ABI check" 2022-10-05 05:13:20 +00:00
Hsin-Yi Chen
f5f04a5b6c Simplify the error message for ABI check
- Remove "VNDK" from the message.
- Deprecate -elf-unreferenced-symbol-errors.
- Fix the status string for CompatibilityStatusIR::UnreferencedChanges.

Test: ./test.py
Bug: 249324120
Change-Id: I5a1fd64f9101caa29d87d9f65bd4d17b8bd77059
2022-10-05 10:13:41 +08:00
Hsin-Yi Chen
fc212f2a34 Merge "Do not allow extending pass-by-value parameters or return types" 2022-10-05 02:03:26 +00:00
Inseob Kim
1c56623fac Add overrides support for snapshots
Overrides properties will now be captured in json flag files, which will
be copied to installed vendor snapshot modules.

Bug: 216567575
Test: soong test && manual install
Change-Id: I921a19b978b17812e830d15df562d217e4e51f73
2022-10-04 14:45:06 +09:00
Treehugger Robot
f8a1fc304c Merge "idegen: Migrate try-finally to try-with-resources for Configuration.java" 2022-10-03 04:50:00 +00:00
utzcoz
e381c93d13 idegen: Migrate try-finally to try-with-resources for Configuration.java
Test: run idegen.sh to generate files for IntelliJ without error

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: If1066d236ef44aff6b9f73a40751ad232a80f6f9
2022-10-01 10:04:48 +00:00
Treehugger Robot
d6c9ae2806 Merge "idegen: Handle symbolic link that targets to current or parent directory" 2022-09-30 06:23:50 +00:00
Hsin-Yi Chen
4f2576b93a Merge "Allow adding class/struct members to padding space" 2022-09-30 02:09:39 +00:00
Hsin-Yi Chen
9f22a276fd Allow adding class/struct members to padding space
This commit removes the comparison between class size and member offsets
from RecordTypeDiffIR::IsExtended. New members can be added to padding
space in a class without changing the existing members.

Test: ./test.py
Bug: 248418092
Change-Id: I34d002478f1dcfd3c183e76899917e602de2b4c1
2022-09-29 19:49:41 +08:00
Hsin-Yi Chen
d875d513f2 Do not allow extending pass-by-value parameters or return types
Resizing the parameters or return types changes the stack layout. It
is not an allowed extension to functions.
AbiDiffHelper::CompareFunctionTypes additionally checks the sizes of the
parameters and the return types. The difference cannot be ignored by
-allow-extensions. The user who intends to ignore the difference should
specify -ignore-symbols or -ignore-linker-set-key.

Test: ./test.py
Bug: 248418092
Change-Id: Ibef3b9260504afff3fc0260b0565736133b8e0dc
2022-09-28 10:59:51 +00:00
Hsin-Yi Chen
efd3826863 Merge "Allow appending members to structs and classes" 2022-09-28 09:18:15 +00:00
Hsin-Yi Chen
e0d81eed8f Merge "Delete VNDK definition tools" 2022-09-28 04:24:25 +00:00
Hsin-Yi Chen
cdf49db15c Allow appending members to structs and classes
This commit adds RecordTypeDiffIR::IsExtended() that determines whether
the difference is a pure extension, i.e., appending members and
increasing the size. The extensions are stored in
record_type_extension_diffs in abi_diff messages. They can be ignored by
specifying -allow-extensions.

Test: ./test.py
Bug: 248418092
Change-Id: Ibdef042c6176dc84d2dd61f71a3f88035e943dd4
2022-09-28 12:18:01 +08:00
Treehugger Robot
a3aa817aa5 Merge "Add FLAG_IMMUTABLE to PendingIntents" 2022-09-24 00:24:30 +00:00
Cole Faust
f4dc2d5f25 Add FLAG_IMMUTABLE to PendingIntents
If your app targets Android 12, you must specify the mutability of each PendingIntent
object that your app creates. This additional requirement improves your app's security.
https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability

Android Lint is being updated, and adds an error-level check for this.

Bug: 247885568
Test: Presubmits
Change-Id: I2bb91d98b443af2b5c16944ce197d863dbd33f9a
2022-09-23 15:17:52 -07:00
Hsin-Yi Chen
adc960d590 Merge "Filter added or removed types by -ignore-linker-set-key" 2022-09-23 03:31:49 +00:00
Hsin-Yi Chen
cc90871286 Merge "Add linker_set_key to RecordTypeDiff and EnumTypeDiff" 2022-09-22 07:00:47 +00:00
utzcoz
97a3f307a6 idegen: Handle symbolic link that targets to current or parent directory
Test: run idegen.sh to generate files for IntelliJ without error

Signed-off-by: utzcoz <utzcoz@gmail.com>
Change-Id: I80958e94f93a8e1ef546bc34bd929d04a224dc9e
2022-09-21 22:03:49 +08:00
Hsin-Yi Chen
37792200d3 Filter added or removed types by -ignore-linker-set-key
Test: development/vndk/tools/header-checker/tests/test.py
Bug: 243903630
Change-Id: I103779591cf8f52f9178d33ad5a205ca4eaaba2f
2022-09-21 09:00:40 +00:00
Hsin-Yi Chen
00d8159166 Add linker_set_key to RecordTypeDiff and EnumTypeDiff
RecordTypeDiff and EnumTypeDiff in abi_diff.proto contain linker set
keys. The developers can copy them to the ignore list. The other Diff
messages do not need the field because it's in the messages imported
from abi_dump.proto.

Test: Update prebuilts/clang-tools; make libz
Bug: 243903630
Change-Id: I1e90d3c6cbfd09d72b3fdb244a4079ae899630aa
2022-09-21 16:50:58 +08:00
Treehugger Robot
16a8d0fa8e Merge "Move SdkSetup app into device/generic/goldfish" 2022-09-20 22:15:01 +00:00
Roman Kiryanov
a60ef1b115 Move SdkSetup app into device/generic/goldfish
this app is designed for emulator

Bug: 247004472
Test: presubmit
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I3fa6178d51551bc3540d03827dea17d5abba06c7
2022-09-19 16:33:48 -07:00
Pirama Arumuga Nainar
dafc6d0793 Merge "Update clang-tools build to clang-r458507" 2022-09-19 20:02:41 +00:00
Krzysztof Kosiński
5acfb41d4a Merge "Remove Python enables identical to global defaults." 2022-09-19 16:08:47 +00:00
Pirama Arumuga Nainar
2e6f159eae Update clang-tools build to clang-r458507
Bug: http://b/236798112
Bug: http://b/244486343
Test: presubmit
Change-Id: Icff1712b289925901582f5429bfea3fde1834eec
2022-09-19 05:16:10 +00:00
Krzysztof Kosiński
45c7ebda06 Remove Python enables identical to global defaults.
Bug: 245854393
Test: presubmit
Change-Id: I9bb5cbd972432a26afcb13d7c2a6bbc73fb0991f
2022-09-17 11:33:50 +00:00
Hsin-Yi Chen
f38939ac24 Delete VNDK definition tools
The tools have not been maintained since Android 11.
vndk-lib-extra-list-*.txt are not deleted because VTS depends on them.

Test: make
Bug: 247032590
Change-Id: Iafaf98d13e77edea34a45c84ac44804703aa6d24
2022-09-16 14:37:04 +08:00
Treehugger Robot
01cd913312 Merge "Revert "Revert "Add license metadata to non-module targets.""" 2022-09-14 18:48:30 +00:00
Matthew Maurer
16ed4a3cc3 Merge changes I78bc86ad,Ieeab8376
* changes:
  c2a: Legacy cleanup
  c2a: Parse new cargo output
2022-09-14 14:41:30 +00:00