Skip to content

wrong mapping of union inside structure #223

@folkfreund

Description

@folkfreund

Just migrated a project from JNA 3.2.7 to 3.5.2
One of the structures contains a union and other fields after that union.

With the new version the fields after the union are mapped to wrong addresses - as if all fields of the union were present. The memory dump by toString shows "deafbeef".

In other words:
The Union's function size() reports the correct value (8), but the next field of the structure is placed 0x20 bytes after the start of the union (0x20 is the sum of all fields inside the union)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions