Bug #2108
getcontext() is missing on DragonFly x86_64
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
I'm seeing this when trying to build pkgsrc/net/powerdns-recursor.
Related todos
Related issues
History
Updated by Peter Avalos 9 months ago
So a little history:
-On the initial import of amd64/x86_64, the functions existed.
-In July 2006 they were removed in 635872e06f82693646a8d979c423433fa839a656
because i386 didn't have them and they are marked obsolete.
-Then in January 2007, they were added for i386 in
e274265043a09fe420ae2182ba74ee43fcfbcbd5.
So that's why they're there for i386 and not x86_64. The question is, do we
want them or not? They are completely removed from IEEE Std 1003.1-2008, but
there's still 3rd-party software that's using those functions. My vote is to
keep them and make them available to x86_64.
Updated by Sascha Wildner 8 months ago
The original amd64 getcontext() we had in libc assumed it was a syscall.
The i386 version is libc only. So just bringing back the amd64 one we had won't
work.
Someone will have to write a x86_64 libc only getcontext.S.
Updated by Magliano Andrea 6 months ago
Maybe a starting point?
http://leaf.dragonflybsd.org/~alexh/0001-getcontext-x86_64-implementation.patch
Updated by John Marino 6 months ago
We need to bump this up in priority. On x86_64, every ruby package using ruby19-base is failing due to missing getcontext and makecontext on pkgsrc-current.
Updated by John Marino 6 months ago
- Priority changed from Normal to High
While researching why chat/gale failed, I discovered Boehm GC uses getcontext. So anything using this garbage collector will fail on X86_64.
Updated by Markus Pfeiffer 5 months ago
I dug up my seemingly working implementation of getcontext for x86_64 last weekend. The email to submit@ seems to have been lost. Anyway, the patch is available at
http://leaf.dragonflybsd.org/~profmakx/getcontext.patch
or in my git repository a3cb33319377734976008e240fded1e69ea07272,
I tested it with w3m, which uses boehm-gc, but had some issues with vkernels that stopped me from testing the other programs mentioned here. Heres a patch, feedback is appreciated.
Updated by Markus Pfeiffer 4 months ago
new commit in my git repository ref 1e29c3ebaaf978d191d581087167cd268268c106
Updated by John Marino 4 months ago
- Assignee deleted (
0)
Hmm, is this ready for testing?
I didn't see these update messages.
A new bulkbuild came in. The Ruby193 failure is worth 416 broken packages by itself.
This should be in Release 3.0 if it's good.
Updated by Markus Pfeiffer 4 months ago
I have a patch in my git repository that adds getcontext, setcontext, makecontext and swapcontext. However, testing this with puffs still segfaults the machine so there are issues. I welcome any testing/feedback though.
Updated by Markus Pfeiffer 4 months ago
commit 5f643fb7f2f5b3020964cfd507b9e8120c19535c in git://leaf.dragonflybsd.org/~profmakx/dragonfly.git now contains a patch that adds the functions in the context-family. I tested puffs, w3m and gale (compiling and running) and up to now i did not have any problems.
Would people please pull this patch and test a bit more intensively than I have time for at the moment?
Updated by Sascha Wildner 4 months ago
- Status changed from New to In Progress
I've committed Markus' implementation. Thanks!
Let's do some testing and if all looks good I'll MFC to 3.0.
Updated by Sascha Wildner 4 months ago
- Status changed from In Progress to Closed
Markus' work was pushed as 1b773b6ea04f3ba154036fa224a73207b22f8182 (master) and 98b8c7e1954b75b6607ab6f87a29ef5538a5fd37 (release).