Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aot/jit native stack bound check improvement #2244

Merged
merged 107 commits into from
Jun 21, 2023

Commits on Jun 12, 2023

  1. Configuration menu
    Copy the full SHA
    991834a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11910cf View commit details
    Browse the repository at this point in the history
  3. aot_add_llvm_func: extract llvm function creation logic

    no functional changes are intended.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    32d2213 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    62ec1b5 View commit details
    Browse the repository at this point in the history
  5. aot: debug

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    0cbd140 View commit details
    Browse the repository at this point in the history
  6. mark the function body noinline

    as inlining can make our stack check almost meaningless.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    22b5d14 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    699913d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f08429e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3a5ab29 View commit details
    Browse the repository at this point in the history
  10. wip

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f206aea View commit details
    Browse the repository at this point in the history
  11. wip

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    07cbe04 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f8a75f6 View commit details
    Browse the repository at this point in the history
  13. aot: read stack usage file

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f8b6be9 View commit details
    Browse the repository at this point in the history
  14. fix a few inverted conditions

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    d373c01 View commit details
    Browse the repository at this point in the history
  15. clang-format

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c5d26e4 View commit details
    Browse the repository at this point in the history
  16. call correct func

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4e0641b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    4a7ed3e View commit details
    Browse the repository at this point in the history
  18. debug code

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    07114a8 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    52dea3d View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    0a56499 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    7458c8e View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    a22a086 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    4ffa025 View commit details
    Browse the repository at this point in the history
  24. precheck function numbering

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    0d56e76 View commit details
    Browse the repository at this point in the history
  25. debug log

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    78982bc View commit details
    Browse the repository at this point in the history
  26. g/c last_alloca

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4f33a13 View commit details
    Browse the repository at this point in the history
  27. debug log

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    aee2c96 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    b531c85 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    01099c1 View commit details
    Browse the repository at this point in the history
  30. clang-format

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    078a302 View commit details
    Browse the repository at this point in the history
  31. aot_add_llvm_func: don't bother to use internal linkage for jit

    as it complicates things with name manglings done by llvm.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    8e193df View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    9f92bbd View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    0671205 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    d959f35 View commit details
    Browse the repository at this point in the history
  35. restructure a bit

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2b817f2 View commit details
    Browse the repository at this point in the history
  36. jit: fill stack_sizes

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2732e67 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    87fdb6c View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    9f40049 View commit details
    Browse the repository at this point in the history
  39. comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    73e1d17 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    d27710d View commit details
    Browse the repository at this point in the history
  41. Revert "debug code"

    This reverts commit 9bee97f.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    a745de0 View commit details
    Browse the repository at this point in the history
  42. Revert "disable jit compilation threads for now"

    This reverts commit 8a4df36.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    8592e3d View commit details
    Browse the repository at this point in the history
  43. clang-format

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b4f55da View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    a91419d View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    49962ac View commit details
    Browse the repository at this point in the history
  46. calculate new sp first

    i thought the old way is a bit more safer.
    but i changed my mind because:
    - as the runtime starts with native_stack_top_min=UINTPTR_MAX,
      the current logic to add the size would overflow.
    - we need to have underflow check anyway
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    d4d43e7 View commit details
    Browse the repository at this point in the history
  47. Revert "Revert "debug code""

    This reverts commit a9864fd.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c053c33 View commit details
    Browse the repository at this point in the history
  48. underflow check

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    d0e11fa View commit details
    Browse the repository at this point in the history
  49. clang-format

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    78a51c2 View commit details
    Browse the repository at this point in the history
  50. fix a type mismatch

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    91f0e7b View commit details
    Browse the repository at this point in the history
  51. aot_runtime: debug log to print stack size

    XXX this breaks windows
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    bd5a26b View commit details
    Browse the repository at this point in the history
  52. Revert "aot_runtime: debug log to print stack size"

    This reverts commit 4ea2f51.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9a23ca5 View commit details
    Browse the repository at this point in the history
  53. Revert "Revert "Revert "debug code"""

    This reverts commit f2efea6.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    35061ec View commit details
    Browse the repository at this point in the history
  54. revert a debug log

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2caa19e View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    11735f0 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    81fb815 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    ff5ff8a View commit details
    Browse the repository at this point in the history
  58. add some error checks

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    90df3ca View commit details
    Browse the repository at this point in the history
  59. fix an assertion

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    92d9b1b View commit details
    Browse the repository at this point in the history
  60. add a comment

    also, remove a too verbose log
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    855ba8c View commit details
    Browse the repository at this point in the history
  61. interpreter: fix app heap __heap_base adjustment

    Initialize globals before instantiate memory because
    memory_instantiate sometimes modify a global. (__heap_base)
    This change ensures the same behavior as AOT.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    bdcb96c View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    e616c6a View commit details
    Browse the repository at this point in the history
  63. aot: fix WASM_ENABLE_DEBUG_AOT

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5038166 View commit details
    Browse the repository at this point in the history
  64. Revert "debug log"

    This reverts commit 7cd9820.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3080061 View commit details
    Browse the repository at this point in the history
  65. Revert "enable module verification for jit as well for now"

    This reverts commit c37ba45.
    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2d3a0d7 View commit details
    Browse the repository at this point in the history
  66. remove stale XXX comments

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    ff0621a View commit details
    Browse the repository at this point in the history
  67. comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9420e85 View commit details
    Browse the repository at this point in the history
  68. comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    66f9815 View commit details
    Browse the repository at this point in the history
  69. remove a stale comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    a113803 View commit details
    Browse the repository at this point in the history
  70. comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    6259e2e View commit details
    Browse the repository at this point in the history
  71. copyright comment

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c8d05f8 View commit details
    Browse the repository at this point in the history
  72. reduce code dup

    yamt committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    be166e8 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. Configuration menu
    Copy the full SHA
    c892b8f View commit details
    Browse the repository at this point in the history
  2. Revert "disable underflow check for comparison"

    This reverts commit c892b8f.
    yamt committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    c605057 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cd5880e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7eb3246 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. Configuration menu
    Copy the full SHA
    57e128b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3894278 View commit details
    Browse the repository at this point in the history
  3. remove redundant memcpy

    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    24f90e4 View commit details
    Browse the repository at this point in the history
  4. comment fixes

    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    8000285 View commit details
    Browse the repository at this point in the history
  5. use align_uint

    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    1664ae8 View commit details
    Browse the repository at this point in the history
  6. style

    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    a5250d4 View commit details
    Browse the repository at this point in the history
  7. read_stack_usage_file: error on unexpected number of precheck functions

    also, improve a few log messages
    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    d45df4c View commit details
    Browse the repository at this point in the history
  8. remove extra LLVMDisposeSectionIterator call

    also, use (uint32)-1 instead of 0xffffffff for AOT_NEG_ONE.
    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    7ace9bd View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cf7a705 View commit details
    Browse the repository at this point in the history
  10. add a few error log

    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    c863450 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7362a1d View commit details
    Browse the repository at this point in the history
  12. aot_resolve_stack_sizes: don't forget to add the offset

    the offset here is most likely 0 though.
    yamt committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    0317e24 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e41ed73 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3fe3a32 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Configuration menu
    Copy the full SHA
    3f87e8f View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. Configuration menu
    Copy the full SHA
    b7babbd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7487102 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34fd5b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6475975 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d082d69 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2575b0c View commit details
    Browse the repository at this point in the history
  7. add a warning

    yamt committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    b9da93f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f9c32bb View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9976da8 View commit details
    Browse the repository at this point in the history
  10. a comment

    yamt committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    04ffbc4 View commit details
    Browse the repository at this point in the history
  11. whitespace

    yamt committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    36bd181 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Configuration menu
    Copy the full SHA
    18ef14e View commit details
    Browse the repository at this point in the history
  2. use bh_memcpy_s

    also, add a comment
    yamt committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    699ebaf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    090552c View commit details
    Browse the repository at this point in the history
  4. use uint64 instead of uint64_t

    yamt committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3c0d82d View commit details
    Browse the repository at this point in the history
  5. add an assertion and comments

    yamt committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a338714 View commit details
    Browse the repository at this point in the history