[issue30910] Add -fexception to ppc64le build

2017-08-17 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: Sorry, I didn't take a deeper analysis on what you said, I guess you wanted to point out this problem: .-. | A C++ code | <= Designed to be the catcher :-: | cpython | <= Malloc'd something but

[issue30910] Add -fexception to ppc64le build

2017-08-17 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: > Throwing exceptions through CPython is totally unsupported, -fexceptions or > not. Like C++ code that's not exception-aware, CPython lacks any of the catch > handlers to properly clean up resources on unwind. wait wait. It's not expected that CPython

[issue30910] Add -fexception to ppc64le build

2017-08-17 Thread Benjamin Peterson
Benjamin Peterson added the comment: Throwing exceptions through CPython is totally unsupported, -fexceptions or not. Like C++ code that's not exception-aware, CPython lacks any of the catch handlers to properly clean up resources on unwind. Thus, throwing exceptions through CPython will lead

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Several comments: - we don't want to risk bugfix branches for this, so this should only go into the master branch (future 3.7) - I'm not sure it's a reasonable policy to fix shortcomings of all compilers in our configure script; though of course we already

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: well, now I'm confused: what should we do with this change? Do we need to ask any other expert? -- ___ Python tracker

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Or isn't interoperability with c++ a concern? I noticed you said that there > are not tests for it currently, but I wonder the reason behind it. I suppose nobody cared enough, and/or those tests are difficult to write (you need a cross-platform way to

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: > Why doesn't gcc make it the default behaviour? Because it "can produce significant data size overhead, although it does not affect execution" for C code. However it'd improves interoperability with C++, which I think it makes sense for a universal

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure why we should apply this patch to CPython. We don't have any tests checking for interoperability with C++ exceptions. We don't have any PPC64LE expertise in-house. It's probably fine for third-party distributors to apply the patch themselves.

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Gustavo Serra Scalet
Gustavo Serra Scalet added the comment: -fexceptions documentation: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fexceptions Highlight to: "you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++"

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Bruno Rosa
Bruno Rosa added the comment: Hi there, I'm delegating this issue to @gut. He will elaborate it with more detail. Thanks a lot, Bruno Rosa -- ___ Python tracker

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread Gustavo Serra Scalet
Changes by Gustavo Serra Scalet : -- nosy: +gut ___ Python tracker ___ ___

[issue30910] Add -fexception to ppc64le build

2017-08-16 Thread STINNER Victor
STINNER Victor added the comment: Can you please elaborate? I don't know the compiler flag -fexceptions. Why is it specific to ppc64le? What about ppc64? What about other platforms? Is this issue specific to Python 2.7? If not, please tag add also 3.6 and 3.7 versions. I never used Python

[issue30910] Add -fexception to ppc64le build

2017-07-12 Thread Bruno Rosa
Changes by Bruno Rosa : -- pull_requests: +2748 ___ Python tracker ___ ___

[issue30910] Add -fexception to ppc64le build

2017-07-12 Thread Bruno Rosa
New submission from Bruno Rosa: To correctly throw and catch exceptions in code that is written in both C and C++, the -fexception is needed. This issue was also reported downstream on Debian and Ubuntu: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862925 -- messages: 298231