Launchpad has imported 1 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=16629.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2014-02-24T03:09:25+00:00 Michael Hudson-Doyle wrote:

Created attachment 7435
adapted from example in 
http://pubs.opengroup.org/onlinepubs/009695399/functions/makecontext.html

I'm attaching a simple demo program for makecontext/swapcontext that I
found somewhere with the addition of code to print the alternate signal
stack before and after calling swapcontext.  On aarch64 it prints this:

start f2
start f1
finish f2
finish f1
{ss_sp: (nil), ss_flags: 2, ss_size: 0}
{ss_sp: 0x7ffbe931f8, ss_flags: 0, ss_size: 8192}

It turns out that because setcontext is implemented in terms of the
rt_sigreturn syscall it ends up copying the uc_stack data from the
passed context into the (kernel) task's sigaltstack parameters.
Hilarity ensues.  Specifically it means that programs linked against the
gccgo runtime sometimes handle signals with SP pointing at memory that
another thread is using for its stack, with predictably bad results.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1279620/comments/5


** Changed in: eglibc
       Status: Unknown => Confirmed

** Changed in: eglibc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1279620

Title:
  stack corruption running "go install launchpad.net/juju-core/..."

To manage notifications about this bug go to:
https://bugs.launchpad.net/eglibc/+bug/1279620/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to