Skip to content

自动生成代码结构体对齐 #85

Description

@caniouff

复现方式:
添加一个NetMulticast的UFunction如下
image

在服务器多次调用,在客户端会出现Crash。

原因:
FTransform中的FQuat添加了对齐,MS_ALIGN(16) struct FQuat(见Quat.h)
而自动生成代码的FCopy_FQuat没有添加。导致FTransformFCopy_FTransform对齐不一致。
image

在写入到参数结构体时,参数结构体的偏移是UE结构体的偏移,而实际创建的结构是以FCopy_XXX为基础的。
正常情况写入FTransform参数的偏移应该是以自动生成代码为准,偏移为4,结果是用的UE结构体的偏移,16。导致写入时写越界了,覆盖了系统中其它变量的内存的值,导致crash。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions