Skip to content

fix PyObject_ToInt32#76419

Merged
DDDivano merged 1 commit intoPaddlePaddle:developfrom
zhengshengning:fix_PyObject_ToInt32
Nov 17, 2025
Merged

fix PyObject_ToInt32#76419
DDDivano merged 1 commit intoPaddlePaddle:developfrom
zhengshengning:fix_PyObject_ToInt32

Conversation

@zhengshengning
Copy link
Contributor

@zhengshengning zhengshengning commented Nov 14, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

修复#76355 中int32上限检查拦截问题

问题描述:
为了在PyObject_ToInt32函数中拦截超过int32的值,一开始在#76355 中将PyLong_AsLong替换成PyLong_AsLongLong,获取值后进行拦截判断。但是该实现在FD推理那边出现了异常拦截(由于没有环境,所以具体原因未知),所以进行了revert,还是使用PyLong_AsLong进行值转换,并增加PyErr_Occurred进行拦截。

@paddle-bot
Copy link

paddle-bot bot commented Nov 14, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@DDDivano DDDivano merged commit d1f0b6b into PaddlePaddle:develop Nov 17, 2025
110 of 114 checks passed
zhengshengning added a commit to zhengshengning/Paddle that referenced this pull request Nov 17, 2025
LittleHeroZZZX pushed a commit to LittleHeroZZZX/Paddle that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants