[Stackless] Problem building release27-maint in 64-bit linux.

Anselm Kruis a.kruis at science-computing.de
Mon Oct 24 13:30:51 CEST 2011


finally I found some time for stackless. We still have to problem with 
the AMD64 code, that does not compile on Linux.

Meanwhile there was a little progress:
- I had access to an OS-X system and was able to successfully test my 
- I simplified the patch. It does not depend on the -fomit-frame-pointer 
/ -fno-omit-frame-pointer flags any more. The price is a little 
overhead, if a frame pointer is used. Thanks to Alexey Bronzenkov.
- I also improved the comments in the patch, because I got the 
impression that some people didn't understand the concept of the patch 

Now, that the patch has been tested on Linux and OS-X I kindly ask to 
apply this patch.


Am 18.08.2011 15:18, schrieb Jeff Senn:
> Anselm - can you have a look and see what you think of Alexey's version?
> Compare with your earlier proposal?  What is you current best version for me to test on OS-X
> (preferably w/o the darwin specific compile option which I can't tell if you
> thought was necessary or not...)
> FWIW: My problem with the 32-bit version does seem to have something to do
> with the llvm version of gcc on Lion... putting a useless (but not optimize-away-able)
> statement directly after the call to slp_switch that refers to cst and cstprev
> causes it to work again... so I suspect either some sort of "bug"
> in code generation -- or an optimization that breaks the stack switching...
> if this sounds familiar to anyone (before I have time to go rip apart and analyze
> the object code -- which will be awhile), please let me know...
> On Aug 17, 2011, at 6:09 PM, Alexey Borzenkov wrote:
>> On Fri, May 6, 2011 at 7:27 PM, Estevo<euccastro at yahoo.com>  wrote:
>>> I got the following error trying to make release27-maint in a 64-bit
>>> gcc -pthread -c -fno-strict-aliasing -DSTACKLESS_FRHACK=0 -g -O2 -DNDEBUG -g
>>> -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I./Stackless
>>> -DPy_BUILD_CORE -fno-omit-frame-pointer -O2 -I. -o Stackless/core/slp_transfer.o
>>> ./Stackless/core/slp_transfer.c
>>> ./Stackless/core/slp_transfer.c: In function ‘slp_transfer’:
>>> ./Stackless/core/slp_transfer.c:153:1: error: bp cannot be used in asm here
>>> make: *** [Stackless/core/slp_transfer.o] Erro 1
>> While working on greenlet and fixing switch-related problems, I found
>> that I cornered myself into the same issue with gcc (as opposed to
>> llvm-gcc used on OS X Lion). It seems that for whatever reasons gcc
>> doesn't allow clobbering rbp when it's using it for referencing stack
>> frame.
>> Coincidentally I managed to find a way to correctly save rbp (as well
>> as csr and cw), that works and compiles both with and without
>> -fomit-frame-pointers. In anyone is interested you can find my
>> slp_transfer for amd64 here:
>> https://bitbucket.org/snaury/greenlet/src/5d37cde9474c/platform/switch_amd64_unix.h
>> If anyone can verify it's 100% correct (though redundant), then you
>> can maybe use it in stackless too.
>> _______________________________________________
>> Stackless mailing list
>> Stackless at stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless

Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stackless-python-slp_transfer.patch
URL: <http://www.stackless.com/pipermail/stackless/attachments/20111024/b0e953fb/attachment.ksh>

More information about the Stackless mailing list