Closed williamcroberts closed 6 years ago
On 09/12/2017 12:04 PM, William Roberts wrote:
Commit 82a2ff9 https://github.com/01org/tpm2-tss/commit/82a2ff9cec3169d33e1ad4433b074d399002f1c0 breaks the abi between tss users and abrmd. Unless all users of the library add pack-struct, then the compiler emits different offsets/padding for the structures members as well as sizeof(struct).
Just created a PR to fix this: https://github.com/01org/tpm2-tss/pull/532 Thanks, -- Tadeusz
Note that the fix from @tstruk #532 still breaks ABI. This is the nature of tracking master though. We will be making more than one change that breaks ABI/API in the run up to a 2.0.0 release.
@tstruk if you merge your commit instead of @williamcroberts', can you please borrow his commit message?
Revert commits without an explanation are really painful since it may not be evident what went wrong with the original commit (in fact any commit without a message makes hard to infer the author's intention behind a change).
@flihp I have tested the #532 change with tools master.
@martinezjavier, yes, I'll update the comment. Thanks for the reminder.
Commit https://github.com/01org/tpm2-tss/commit/82a2ff9cec3169d33e1ad4433b074d399002f1c0 breaks the abi between tss users and abrmd. Unless all users of the library add pack-struct, then the compiler emits different offsets/padding for the structures members as well as sizeof(struct).
Don't pack public structus shared. This notably hurts when calling from abrmd into the tcti stuffs that use the struct TCTI_SOCKET_CONF.
I'm getting tons of memory issues like this: