Skip to content

Commit

Permalink
i#2674: fix -sysenter_is_int80 (#3109)
Browse files Browse the repository at this point in the history
For SA_RESTART, in init_build_bb() we change start_pc to
vsyscall_sysenter_displaced_pc: but we need to not do that when not
hooking vsyscall to avoid sending the app to a NULL pc.

Fixes #2674
  • Loading branch information
derekbruening authored Jul 21, 2018
1 parent 1d9c668 commit 18f63a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/arch/interp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2011-2017 Google, Inc. All rights reserved.
* Copyright (c) 2011-2018 Google, Inc. All rights reserved.
* Copyright (c) 2001-2010 VMware, Inc. All rights reserved.
* **********************************************************/

Expand Down Expand Up @@ -258,7 +258,7 @@ init_build_bb(build_bb_t *bb, app_pc start_pc, bool app_interp, bool for_cache,
* whose fall-through hits our hook. We avoid interpreting our own hook
* by shifting it to the displaced pc.
*/
if (start_pc == vsyscall_sysenter_return_pc)
if (DYNAMO_OPTION(hook_vsyscall) && start_pc == vsyscall_sysenter_return_pc)
start_pc = vsyscall_sysenter_displaced_pc;
#endif
bb->check_vm_area = true;
Expand Down

0 comments on commit 18f63a5

Please sign in to comment.