Modify

#11946 closed Bugs (fixed)

Boost.Context crashes on x86_64/MinGW

Reported by: tomasz.wlostowski@… 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)

boost-mingw64-context.patch (1.4 KB) - added by tomasz.wlostowski@… 22 months ago.

Download all attachments as: .zip

Change History (6)

Changed 22 months ago by tomasz.wlostowski@…

Attachment: boost-mingw64-context.patch added

comment:1 Changed 22 months ago by olli

Hello Thomas, unfortunately the patch would not apply because the code has some significant changes. Issue regarding to 'movl 1, %rcx' is gone.

Last edited 22 months ago by olli (previous) (diff)

comment:2 Changed 22 months ago by tomasz.wlostowski@…

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 in reply to:  2 Changed 22 months ago by olli

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:4 Changed 19 months ago by olli

Ok, no further comments - so I close this issue.

comment:5 Changed 19 months ago by olli

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain olli.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.