Commit Graph

15 Commits

Author SHA1 Message Date
Yi-yo Chiang
c79ffcedda Remove "is_inlined" from header-abi-dumper
This commit removes "is_inlined" flag from lsdump's VTableComponent,
because the clang library used to walk the ast doesn't report accurate
information about whether a member function is inlined or not.

Also update the testcases.

Bug: 80217511
Test: ./tests/test.py
Change-Id: I0e133b140a4f3debff8030de7d6712590cf98d76
2018-08-03 14:36:35 +08:00
Yi-yo Chiang
0218a940cb Add is_inlined and is_pure property to header-abi-dump
- abi_dump.proto: Adds is_inlined and is_pure flag to VTableComponent.
is_inlined means a virtual function is inlined and probably not exported.
is_pure means a virtual function is pure and probably not exported.

Bug: 80217511
Test: ./tests/test.py
Change-Id: Ic1562ed47faba1f3d7eec6dffe94991296ba7176
2018-07-23 14:58:03 +08:00
Hsin-Yi Chen
cd1eada7b0 Show thunk symbols in vtables
- Convert method declarations to thunk symbols if thunk information
  exists.
- Add a test case and reference dumps for virtual inheritance.

Bug: 80671888
Test: ./tests/test.py
Change-Id: I55ecbd7c8b0f5b0f534d81e6c6967f99ffd1d42e
2018-06-29 10:57:31 +00:00
Jayant Chowdhary
e90b33a9d9 header-abi-diff: Add a flag to consider opaque types with different names structurally unequal.
Bug: 79576032

Test: tests/test.py

Change-Id: I28cb7a2676a1e85e4ef1d2faaf6684d7c1824370
2018-06-04 11:50:05 -07:00
Jayant Chowdhary
b31dbb37f6 header-abi-diff: Fix omission of warning message for extensions.
Test: Without change : extend libjpeg; build breaks without warning message
      specifying extension

Test: With change : extend libjpeg; build breaks with warning message specifying
      extension

Test: tests/test.py

Change-Id: I1653a977d0945810b4b9dc4ec9923b12c4f5dc36
2018-05-24 18:12:55 -07:00
Jayant Chowdhary
03c4e279a8 header-abi-diff: Fix return code for extension in presence of elf only changes.
Before this change, an elf symbol change not exported through public
headers would short circuit the check for api extension. As a result,
header-abi-diff would return a compatible return status (0). This isn't
correct, extensions should take precedence over elf only changes and an
extension status should be returned (non zero).

Test: tests/test.py

Change-Id: I6907d0ebaf332d019cdf2e264316f7d521e00d82
2018-05-23 21:11:22 -07:00
Jayant Chowdhary
6893d8cc69 Mark two records as different if the access specifier is downgraded.
Earlier, we marked two records as different if their access specifiers
were not the same.

Bug: http://b/79493296

Test: tests/test.py

Change-Id: I117a408c7a85624a1e3d7a7477ae789eddd4bccc
2018-05-14 14:07:49 -07:00
Jayant Chowdhary
9c569ce793 Fix incorrect public object access specifiers.
Bug: 78184573

Test: tests/test.py

Change-Id: I9cf5df612322eb66e9a46450d7f43c99586dbab6
2018-04-17 13:37:16 -07:00
Jayant Chowdhary
bab864d2d0 Add test for function pointer diffing.
Bug: 71486762

Test: tests/test.py

Change-Id: Id956804c36b0c06b4e6259d6864438974ed18267
2018-03-21 22:13:55 -07:00
Jayant Chowdhary
3bc023f373 Add an additional test for ODR.
Also add missing test source files.

Test: tests/test.py

Change-Id: I44ec2cab9596e4722600995855d0a035e304e7ae
2018-02-12 13:43:54 -08:00
Jayant Chowdhary
7cc00996e5 Fix map key in header-abi-diff while extracting user defined types.
The key being added to respective maps which facilitate diffing of
unreferenced user defined types was earlier the linker set key. The
unique id should be used instead. This is because linker set keys for C
and C++ types can be the same, but their unique id's cannot. Thus,
having linker set keys as a key leaves open the possibility of false
type aliasing, whereas the unique id does not.

Test: python3 tests/test.py

Test: python3 tests/test.py \
      MyTest.test_libc_and_cpp_with_unused_struct_and_libc_and_cpp_with_unused_cstruct;
      before this change, this test fails; after this change, the test
      passes.

Change-Id: I91816167a48308a8c812d01e0a09e9bb70c60b50
2018-02-07 13:04:30 -08:00
Jayant Chowdhary
537edf605d Fix invalidation of vector iterator while computing removed class fields.
Test: tests/test.py pass

Change-Id: I58eb0966972c8fc1f74cd6a28708c5f591a77f75
2018-01-02 18:47:48 -08:00
Jayant Chowdhary
a668261e85 Fix missing setter for RecordKind.
The record kind (struct, class or union) was not being set while
converting from protobuf to IR.

Test: tests/test.py, all tests pass. Without the change, the default
      kind of a C record would have shown up as class_kind.

Change-Id: I507581211a6d30c2c51414c6fab6413eece6b458
2017-12-07 12:48:42 -08:00
Jayant Chowdhary
29092604b2 Fix how header-checker tests run.
Previously, the tests mainly exercised header-abi-diff.
After this change, checked-in reference dumps are compared with
generated dumps. This allows us to:
  - get header-abi-dumper and header-abi-linker involved in testing
    better.
  - Know about any incompatbile message format changes made
    inadvertently.

Test: tests/test.py; all tests pass.

Change-Id: I7c7ba0811e6c08c6194a0a11616680279e7a0e1d
2017-12-07 12:46:10 -08:00
Jayant Chowdhary
860b41407e Add more comprehensive tests for abi diffing.
1) We do not involve the build system to create test reference dumps. Symbols
in tests, are faked through version scripts to avoid checking in prebuilt .so
test files.

2) Also add a script to create reference abi dumps.

3) Fix a comment in ast_processing.cpp

Test: Run tests/test.py, all tests run and pass on generic arm64, mips64
and x86_64 builds.

Change-Id: Id3a420c1ae093a05a79da4c29e85071f28d714d1
2017-08-24 23:41:01 -07:00