Opened 7 years ago
Closed 6 years ago
#11946 closed Bugs (fixed)
Boost.Context crashes on x86_64/MinGW
Reported by: | Owned by: | olli | |
---|---|---|---|
Milestone: | To Be Determined | Component: | context |
Version: | Boost 1.60.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
Dear Boost Developers,
The GNU assembler version of the make_fcontext()/jump_fcontext() functions on x86_64 platforms have a serious bug that causes the program to segfault: the GAS code loads an invalid memory location instead of a constant due to a missing '$', for example:
Is: movq 1, rcx rcx = mem[1] Should be: movq $1, rcx rcx = 1 movq $1, %rcx -> moves
The attached patch fixes the issue.
Best Regards, Tomasz Wlostowski
Attachments (1)
Change History (6)
by , 7 years ago
Attachment: | boost-mingw64-context.patch added |
---|
follow-up: 3 comment:2 by , 7 years ago
Hi,
I don't mind as long as it works again on Win64.
BTW. Are you planning to introduce any changes to the API?
Tom
comment:3 by , 7 years ago
Replying to tomasz.wlostowski@…:
I don't mind as long as it works again on Win64.
the unit-tests should pass
BTW. Are you planning to introduce any changes to the API?
yes, already done (see branch master/develop). I was asked to change the API for performance reasons. This applies only to fcontext_t (removed to namespace detail) - boost.context still uses the fcontext_t-API.
comment:5 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hello Thomas, unfortunately the patch would not apply because the code has some significant changes. Issue regarding to 'movl 1, %rcx' is gone.