I have these CFLAGS set in /etc/make.conf: CFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe" greenlet compiles well with them, but fails to work with "python2.6: greenlet.c:278: slp_save_state: Assertion `ts_current->stack_saved == 0' failed." error on 2nd switch() request (in python code). If compiled without -fomit-frame-pointer everything works well. Reproducible: Always Steps to Reproduce: 1. set -fomit-frame-pointer in /etc/make.conf 2. emerge dev-python/greenlet-0.3.1 3. try this: from greenlet import greenlet def test1(x, y): z = gr2.switch(x+y) print(z) def test2(u): print(u) gr1.switch(42) gr1 = greenlet(test1) gr2 = greenlet(test2) gr1.switch("hello", " world") Actual Results: Fails both with 2.x and 3.x python branches with error: python ~/tt.py hello world python2.6: greenlet.c:278: slp_save_state: Assertion `ts_current->stack_saved == 0' failed. zsh: abort python ~/tt.py Expected Results: python ~/tt.py hello world 42
Created attachment 253323 [details] Fixed ebuild Removes -fomit-frame-pointer for greenlet compilation.
Created attachment 253327 [details, diff] Patch against greenlet-0.3.1.ebuild
Vadim: Could you please open an upstream bug about this?
This bug might be specific to x86.
not reproducible on amd64. flags bugs are best reported upstream anyway.