Commit 8e618b58 authored by Stefan Behnel's avatar Stefan Behnel

Avoid segfault due to a bug in g++ 4.4.7 when the -Os setting for the module...

Avoid segfault due to a bug in g++ 4.4.7 when the -Os setting for the module init function is enabled.
Closes #2235.
parent 27ad490b
......@@ -16,6 +16,9 @@ Bugs fixed
* ``UnicodeEncodeError`` in Py2 when ``%s`` formatting is optimised for
unicode strings. (Github issue #2276)
* Work around a crash bug in g++ 4.4.x by disabling the size reduction setting
of the module init function in this version. (Github issue #2235)
0.28.2 (2018-04-13)
===================
......
......@@ -669,7 +669,8 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
#define CYTHON_SMALL_CODE
#elif defined(__GNUC__)
#elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
// At least g++ 4.4.7 can generate crashing code with this option. (GH #2235)
#define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
#else
#define CYTHON_SMALL_CODE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment