Modify

Ticket #11946 (closed Bugs: fixed)

Opened 14 months ago

Last modified 11 months ago

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

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

Change History

Changed 14 months ago by tomasz.wlostowski@…

comment:1 Changed 14 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 14 months ago by olli (previous) (diff)

comment:2 follow-up: ↓ 3 Changed 14 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 14 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 11 months ago by olli

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

comment:5 Changed 11 months ago by olli

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.