Am 12.05.2011 21:22, schrieb Stefan Hajnoczi:
> On Thu, May 12, 2011 at 7:12 PM, Blue Swirl <blauwir...@gmail.com> wrote:
>> On Thu, May 12, 2011 at 12:54 PM, Stefan Hajnoczi
>> <stefa...@linux.vnet.ibm.com> wrote:
>>> diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c
>>> new file mode 100644
>>> index 0000000..3b14ebf
>>> --- /dev/null
>>> +++ b/coroutine-ucontext.c
>>> @@ -0,0 +1,73 @@
>>> +/*
>>> + * ucontext coroutine initialization code
>>> + *
>>> + * Copyright (C) 2006  Anthony Liguori <anth...@codemonkey.ws>
>>> + * Copyright (C) 2011  Kevin Wolf <kw...@redhat.com>
>>> + *
>>> + * This library is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU Lesser General Public
>>> + * License as published by the Free Software Foundation; either
>>> + * version 2.0 of the License, or (at your option) any later version.
>>> + *
>>> + * This library is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>>> + * Lesser General Public License for more details.
>>> + *
>>> + * You should have received a copy of the GNU Lesser General Public
>>> + * License along with this library; if not, write to the Free Software
>>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
>>> 02110-1301 USA
>>
>> Please use the web link version.
> 
> Will update in v3.
> 
>>> + */
>>> +
>>> +/* XXX Is there a nicer way to disable glibc's stack check for longjmp? */
>>
>> What is the problem?
> 
> Kevin?

I don't remember the details of the mechanism, but with _FORTIFY_SOURCE
glibc has some check in longjmp that doesn't like stack switches. If you
uncomment the #undef, you should be able to reproduce the abort().

Kevin

Reply via email to