Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【必现崩溃】#634的改动会导致在Lua中按引用传递C++定义的结构体时,必定崩溃 #689

Open
Soulrac-ydd opened this issue Feb 2, 2024 · 1 comment

Comments

@Soulrac-ydd
Copy link

image
image
image
image
img_v3_027m_f994d584-1e95-4cc6-bd52-97064f1241eg

定位到问题所在就是#634的修改导致的,改回浅拷贝就正常运行了
image
深拷贝会触发结构体内部容器的copy,如果此前dest对应容器内部存储的(如示例FString)数据地址与src对应容器内部存储的(如示例FString)数据地址相同,那么在容器copy时会优先Empty清掉dest内的数据,由于容器内存储数据地址相同,src的也被清了,地址非法,这时再从src向dest拷贝就会崩溃

@PredawnRaziel
Copy link

非常好issue,使我的code旋转。
#634 是去年7月的更新,我怀疑跟某些后续的更新有逻辑冲突,比如去年11月提交的 e4c36a2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants