Branch: refs/heads/new-parallel-parsing
  Home:   https://github.com/dyninst/dyninst
  Commit: 1e30a1200d2aef0b46b048088d99a7dd99ff5675
      
https://github.com/dyninst/dyninst/commit/1e30a1200d2aef0b46b048088d99a7dd99ff5675
  Author: Xiaozhu Meng <xm...@cs.wisc.edu>
  Date:   2018-08-05 (Sun, 05 Aug 2018)

  Changed paths:
    M parseAPI/src/IA_aarch64.C
    M parseAPI/src/IA_power.C
    M parseAPI/src/IA_x86.C
    M parseAPI/src/Parser.C
    M parseAPI/src/Parser.h

  Log Message:
  -----------
  Fix undeterministic tail call identification results exposed in parallel code 
parsing

The tail call identification algorithm contains two related heuristics:
(1) A jump to a block within the same function is not a tail call
(2) A jump to a known entry point is a tail call

For (1), whether or not the jump target is within the current function depends 
on
the parsing order of other functions, especially the callee functions. To have a
consistent tail call identification results, I add a tail call cleaning phase in
the parsing finalizing phase. Because we already know the complete function
boundary at function finalizing time, we can rectify the bogus tail calls and
removed the functions caused by those bogus tail calls.

For (2), if a known entry point is created by a bogus tail call, (2) will lead 
to
more bogus tail calls. This is exposed by a special case. Suppose function A
contains multiple jumps to block B. Block B has no incoming edges from any other
function, nor does it has a symbol associated. So, B should be part of A. One of
the jump in A (denoted as J1) will be marked as tail call because it tears down
the stack frame before the jump, while other jumps (denoted as non-J1) will not
be marked as tail calls. If J1 is parsed before non-J1, block B will be marked 
as
a tail call entry, and all non-J1 will be marked as tail calls because they jump
to ``a known entry''. Function A will thus not contain B, and the rectify method
mentioned in the previous parapgraph will not work. So, I change to only mark a
jump as a tail call when the target is a hint.



      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.
_______________________________________________
Dyninst-api mailing list
Dyninst-api@cs.wisc.edu
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api

Reply via email to