Skip to content

Conversation

@jianchun
Copy link

DeferredParsingThunk asm didn't have eh frame data. If an exception is
thrown during its execution (calling JavascriptFunction::DeferredParse),
process will crash because it cannot unwind the stack correctly.

Changed to use asm macroes which adds cfi directives. Applied the same
fix to DeferredDeserializeThunk.

pop_nonvol_reg rbp
NESTED_END _ZN2Js18JavascriptFunction20DeferredParsingThunkEPNS_16RecyclableObjectENS_8CallInfoEz, _TEXT

jmp rax
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jianchun this needs to be moved before NESTED_END. Same applies to the one below. After that, perhaps it should just work. I don't see anything else problematic here. Didn't check the codes but interesting clang/ld etc didn't bother linking this one on Ubuntu..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@obastemur Thanks for looking! Do you mean moving jmp rax? (Was troubled by this one. Would look fine if it were a call and ret before NESTED_END. But it is a jmp.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying that, seems working fine after moved on Ubuntu

DeferredParsingThunk asm didn't have eh frame data. If an exception is
thrown during its execution (calling JavascriptFunction::DeferredParse),
process will crash because it cannot unwind the stack correctly.

Changed to use asm macroes which adds cfi directives. Applied the same
fix to DeferredDeserializeThunk.
@obastemur
Copy link
Collaborator

:shipit:

@digitalinfinity
Copy link
Contributor

lgtm

@jianchun
Copy link
Author

@obastemur @digitalinfinity Thanks!

@chakrabot chakrabot merged commit 5881d49 into chakra-core:linux Jul 29, 2016
chakrabot pushed a commit that referenced this pull request Jul 29, 2016
Merge pull request #1354 from jianchun:fixasm

DeferredParsingThunk asm didn't have eh frame data. If an exception is
thrown during its execution (calling JavascriptFunction::DeferredParse),
process will crash because it cannot unwind the stack correctly.

Changed to use asm macroes which adds cfi directives. Applied the same
fix to DeferredDeserializeThunk.
@jianchun jianchun deleted the fixasm branch July 29, 2016 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants