-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Hi,
First of all, I love minicoro and was able to play with it on various systems with many architectures. I tried on my favorite of choice, OpenBSD (amd64 for now) and unfortunately as secure as it is I guess the current assembly code is not compatible with.
Trying a very minimal example ends with:
[a.out]25923/502807 sp=3fbcd3a2388 inside 7b6448f83000-7b6449382fff: not MAP_STACK
Segmentation fault (core dumped)
The core dump does not provide any useful information though:
(lldb) bt
* thread #1, stop reason = signal SIGSEGV
* frame #0: 0x00000fddd963b909 ld.so`_dl_bind(object=0x00000fde64344800, index=<unavailable>) at rtld_machine.c:352:13
frame #1: 0x00000fddd9643421 ld.so`_dl_bind_start at ldasm.S:107
frame #2: 0x00000fdb9d46ba98 a.out`entrypoint(self=0x00000fde7e04e000) at test.c:9:2
frame #3: 0x00000fdb9d46bb78 a.out`_mco_main(co=0x00000fde7e04e000) at minicoro.h:622:3
I don't really know how to make context switch in assembly so I'll not be able to help. However, I've seen various others doing less performant alternatives based on setjmp/longjmp as last resort. Not sure if that could make for asymmetric coroutines but I'll have a look as temporary fix if possible
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels