【问题标题】:How to compile python 3 without sigaltstack enabled?如何在不启用 sigaltstack 的情况下编译 python 3?
【发布时间】:2013-11-02 00:12:20
【问题描述】:

This project 声明 Python 3 must be compiled without sigaltstack enabled. 那么在不启用 sigaltstack 的情况下编译 Python 3 需要做什么?

【问题讨论】:

    标签: python python-3.x compilation makefile configure


    【解决方案1】:

    使用您想要的选项运行./configure。然后,除了Makefileconfig.log,你还会得到pyconfig.h

    编辑pyconfig.h:查找包含HAVE_SIGALTSTACK的行,删除或注释掉该行。

    #define HAVE_SIGALTSTACK 1
    

    那么,make,...


    如何确认:检查faulthandler模块是否有_stack_overflow功能。它不应该有它。

    >>> import faulthandler
    >>> print(hasattr(faulthandler, '_stack_overflow'))
    False
    

    根据faulthandler module documentation

    故障处理程序与 Appor 等系统故障处理程序兼容 或 Windows 故障处理程序。该模块使用替代堆栈 如果 sigaltstack() 函数可用,则信号处理程序。这 允许它在堆栈溢出时转储回溯。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-29
      • 2019-05-29
      • 2019-08-14
      • 2020-12-05
      • 2014-01-28
      • 2018-04-28
      • 1970-01-01
      • 2022-11-10
      相关资源
      最近更新 更多