|
Boost : |
Subject: Re: [boost] [context review] Several Questions
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-03-21 18:17:37
> >
> > a) (BIG ONE) The shared object link using fcontext crashes!
> >
> > Using boost_1_46_0
>
> boost-1.46 not tested - use 1.45, please
Sorry, I can't accept this, also because crash happens
inside boost_context function I don't think it is related
to 1.45 / 1.46 differences
>
> > Building boost_context:
> >
> > bjam toolset=gcc context-impl=asm architecture=x86
>instruction-set=native
> > address-model=64 --with-context
> > variant=release stage
>
> which platform i386? Into the documention I provide for all the platforms
>(arm, i386, x86_64, mips, ppc) the bjam-options you have to used.
> - for x86 64bit: bjam toolset=gcc architecture=x86 instruction-set=yorksfield
>address-model=64 context-impl=asm
>
> > Then I compile example link.cpp
> >
> > Run it
> >
> > It crashes!
> >
>
> not in my test
>
Unfortunately it is not so good answer :-)
Fresh Build with bjam:
bjam toolset=gcc context-impl=asm architecture=x86 instruction-set=yorksfield
address-model=64 --with-context stage
Build of program:
g++ -g -O3 -Wall link.cpp -I ../../boost_1_46_0 -L ../../boost_1_46_0/stage/lib/
-Wl,-rpath=../../boost_1_46_0/stage/lib/ -lboost_context -lrt
$ ./a.out
Segmentation fault
$ gdb ./a.out
GNU gdb (GDB) 7.2-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/artik/Packages/boost/reviews/bc/a.out...done.
(gdb) r
Starting program: /home/artik/Packages/boost/reviews/bc/a.out
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00000000006033f0 in get_fcontext ()
(gdb) bt
#0 0x00000000006033f0 in get_fcontext ()
#1 0x00000000004018cd in context () at
../../boost_1_46_0/boost/context/context.hpp:68
#2 main () at link.cpp:24
Starting program: /home/artik/Packages/boost/reviews/bc/a.out
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00000000006033f0 in get_fcontext ()
I'd suggest to dig deeper because it can have very critical effect
on how reviewers will see this library.
> this is not my fault - boost.build in its current version
No more explanations required... I know all drawbacks of BBv2 and accept as
fully reasonable answer! (When do we move to CMake?..)
> Do mean why you can specify to use the context swapping provided by the
> Operating System or the assembler code (==fcontext)?
I mean something like
boost::context<> // some default
boost::ucontext<>
boost::fcontext<>
So you can have two implementations in same code.
Thanks,
Artyom
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk