-
Notifications
You must be signed in to change notification settings - Fork 0
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
bpo-46498: Add new triplets for loongarch64 #2
base: la64/main
Are you sure you want to change the base?
Conversation
这个改法是我提的,commit message 加上 |
当然 |
a89b10f
to
a75075e
Compare
在看一下还没有问题,如果可以的话,希望下午就将此commit提交,cpython更新的速度太快,托的太久还要重新整理提交 @xen0n @yetist @zhuyaliang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit message 每行不需要加星号(别人加是因为他们想表达一个列表)
otherwise LGTM
Suggested by WANG Xuerui
a75075e
to
1566f72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
没必要重新创建分支呀,可以在原来那个分支上继续修改,然后 push --force 就可以继续讨论了。 |
@@ -884,6 +884,20 @@ cat >> conftest.c <<EOF | |||
hppa-linux-gnu | |||
# elif defined(__ia64__) | |||
ia64-linux-gnu | |||
# elif defined(__loongarch__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不如干脆把 loongarch32 也写上,或者把最外层的 __loongarch__
去掉?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loongarch32 的宏定义在规范文档里没写,所以暂时没加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__loongarch_xxx_float
这 3 个应该不分 32、64 吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__loongarch_xxx_float
这 3 个应该不分 32、64 吧?
看文档,这仨只表达浮点 ABI,整数 ABI 是 __loongarchXX
表达的,这样写应该没问题
https://bugs.python.org/issue46498#msg411701 这里的讨论指向的是 #1, 现在把 #1 给 close 了,这不是有点尴尬了?
|
另外 46498 上附加的补丁显然不对。 |
https://bugs.python.org/issue46498 补丁将会进行更新 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那就先这样吧,rebase一下把补丁更新了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我看可以了
虽然现在 3 个赞了,不要直接合,听 @yetist 先 rebase 一下准没错 |
happy new year! 开工大吉! |
我看上游还没有合并呢,要不要给这里再加一个补丁: cpython/Modules/_ctypes/callproc.c Lines 1114 to 1116 in 7cf285d
|
不是很确定,参考下当时 RV 修他们问题的上下文,跑下测试?如果 LA 上也是挂的,那就也要带上,否则不用了 cpython/Misc/NEWS.d/3.8.0a1.rst Lines 1794 to 1800 in 7cf285d
|
…python#91466) Fix an uninitialized bool in exception print context. `struct exception_print_context.need_close` was uninitialized. Found by oss-fuzz in a test case running under the undefined behavior sanitizer. https://oss-fuzz.com/testcase-detail/6217746058182656 ``` Python/pythonrun.c:1241:28: runtime error: load of value 253, which is not a valid value for type 'bool' #0 0xbf2203 in print_chained cpython3/Python/pythonrun.c:1241:28 #1 0xbea4bb in print_exception_cause_and_context cpython3/Python/pythonrun.c:1320:19 #2 0xbea4bb in print_exception_recursive cpython3/Python/pythonrun.c:1470:13 python#3 0xbe9e39 in _PyErr_Display cpython3/Python/pythonrun.c:1517:9 ``` Pretty obvious what the ommission was upon code inspection.
我也不是很确定,前两天看 libffi 的 PR 感觉理论上我们也需要这个东西,但是我跑 test 是好的。 |
跟我感受差不多。。他那个代码片段完整是: cpython/Modules/_ctypes/callproc.c Lines 1114 to 1119 in 7cf285d
控制的行为在: cpython/Modules/_ctypes/callproc.c Lines 1238 to 1257 in 7cf285d
打开 |
它其实说的是对于大于 8 字节或者不是 2 的整数次幂的东西会复制一下再进行传递。这是因为 libffi 的文档里面说 libffi 的“按值传递”是假的,比如一个 32 字节的结构体我们直接扔给 libffi 去传递,等函数返回以后我们可能发现结构体的值变了: 现在 libffi 的情况我认为让他们搞得非常混乱。之前有人为 ARM64 修了这个问题,但后来又撤回了,因为毕竟按文档来说这是“feature”,不是“bug”: libffi/libffi@482b37f 但是又有人加了个 test,似乎暗含的意思是按值传递“应该”正常工作: 于是我在 libffi 的 PR 里面 at 维护者去问,结果人家不鸟我…… |
libffi 那边的最新回复是这个问题在 libffi 一侧解决,Python 侧不用加。 |
#1 (comment) 根据新世界规范,重新提交补丁。 由于上游最近合的较多,重新创建了分支 @xen0n @loongarch64/dev-team
configure为autoconf生成