Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344305 - dev-python/greenlet-0.3.1 doesn't work with -fomit-frame-pointer
Summary: dev-python/greenlet-0.3.1 doesn't work with -fomit-frame-pointer
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 18:27 UTC by Vadim Fint
Modified: 2012-01-19 15:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed ebuild (greenlet-0.3.1-r1.ebuild,673 bytes, text/plain)
2010-11-05 18:27 UTC, Vadim Fint
Details
Patch against greenlet-0.3.1.ebuild (ebuild_diff.patch,381 bytes, patch)
2010-11-05 18:28 UTC, Vadim Fint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Fint 2010-11-05 18:27:04 UTC
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
Comment 1 Vadim Fint 2010-11-05 18:27:50 UTC
Created attachment 253323 [details]
Fixed ebuild

Removes -fomit-frame-pointer for greenlet compilation.
Comment 2 Vadim Fint 2010-11-05 18:28:52 UTC
Created attachment 253327 [details, diff]
Patch against greenlet-0.3.1.ebuild
Comment 3 Johan Bergström 2010-11-11 08:48:17 UTC
Vadim: Could you please open an upstream bug about this?
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-03-31 14:24:08 UTC
This bug might be specific to x86.
Comment 5 Sébastien Fabbro (RETIRED) gentoo-dev 2012-01-19 15:43:57 UTC
not reproducible on amd64. flags bugs are best reported upstream anyway.