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

Check safe initialization of static objects #16970

Merged
merged 113 commits into from
Jun 16, 2023

Commits on Jun 12, 2023

  1. WIP - check global objects

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b787d3c View commit details
    Browse the repository at this point in the history
  2. Add more docs

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    337730b View commit details
    Browse the repository at this point in the history
  3. Add code skeleton

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    e112581 View commit details
    Browse the repository at this point in the history
  4. More code type check

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9604f76 View commit details
    Browse the repository at this point in the history
  5. Add skeleton

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    a3b9f12 View commit details
    Browse the repository at this point in the history
  6. Refine abstract domain

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    ce25221 View commit details
    Browse the repository at this point in the history
  7. Check cycles

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f8960f3 View commit details
    Browse the repository at this point in the history
  8. Fix cache

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    0f4afa8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    db0430c View commit details
    Browse the repository at this point in the history
  10. Introduce Bottom value

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f6d255a View commit details
    Browse the repository at this point in the history
  11. Define evalType

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    03afb7d View commit details
    Browse the repository at this point in the history
  12. Remove Ext

    It is impossible to take advantage of Ext if static objects can be mutable.
    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    fea9fb9 View commit details
    Browse the repository at this point in the history
  13. Fix init and resolveThis

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    46c7b8b View commit details
    Browse the repository at this point in the history
  14. Fix call

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    e997bc0 View commit details
    Browse the repository at this point in the history
  15. Fix callConstructor

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    fab38b5 View commit details
    Browse the repository at this point in the history
  16. Fix select

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    e6dbb2d View commit details
    Browse the repository at this point in the history
  17. Fix instantiate

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    d6278d1 View commit details
    Browse the repository at this point in the history
  18. First test passes

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4b8a041 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3e0f1b9 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    c7642f3 View commit details
    Browse the repository at this point in the history
  21. Refine printing

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9160e6c View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    daf1e50 View commit details
    Browse the repository at this point in the history
  23. Enable cache

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9c2a570 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    3ff3774 View commit details
    Browse the repository at this point in the history
  25. Better trace

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    46b2594 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    61152e0 View commit details
    Browse the repository at this point in the history
  27. Fix cast crash

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    778cf2d View commit details
    Browse the repository at this point in the history
  28. Fix trace for objects

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    8793ba8 View commit details
    Browse the repository at this point in the history
  29. Reorganize tests

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b1adb98 View commit details
    Browse the repository at this point in the history
  30. Fix error annotations

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    055f1d7 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    d41cf8b View commit details
    Browse the repository at this point in the history
  32. Add t9312

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    99eaf43 View commit details
    Browse the repository at this point in the history
  33. Add t9261

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c04bc16 View commit details
    Browse the repository at this point in the history
  34. Add t9115

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c2ec366 View commit details
    Browse the repository at this point in the history
  35. Add t5366

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    e26b686 View commit details
    Browse the repository at this point in the history
  36. Add i11262

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    66be029 View commit details
    Browse the repository at this point in the history
  37. Add more global tests

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3197f5a View commit details
    Browse the repository at this point in the history
  38. Add crash test

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3fe429f View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    91e9c6a View commit details
    Browse the repository at this point in the history
  40. Fix crash

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5d31d3e View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    e99f706 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    b3b696f View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    2bbab07 View commit details
    Browse the repository at this point in the history
  44. Suppress debug printing

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b06adad View commit details
    Browse the repository at this point in the history
  45. Fix rebase error

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9800395 View commit details
    Browse the repository at this point in the history
  46. Refine abstract domain

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    26e01ad View commit details
    Browse the repository at this point in the history
  47. Handle assignment

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    a5ed526 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    8c42c6d View commit details
    Browse the repository at this point in the history
  49. Fix compilation

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    3938f8e View commit details
    Browse the repository at this point in the history
  50. Add documentation

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    708a4dd View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    cf49ce4 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    a282ce9 View commit details
    Browse the repository at this point in the history
  53. Introduce init.widen

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b4b0d07 View commit details
    Browse the repository at this point in the history
  54. Respect environment

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c221da1 View commit details
    Browse the repository at this point in the history
  55. Fix error annotation

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2f75e5e View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    27ff0eb View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    d69fc4f View commit details
    Browse the repository at this point in the history
  58. Use ListSet to avoid explosion due to duplicate entries

    It can be demonstrated by tests/init/neg/inherit-non-hot.scala.
    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    7a1e7f3 View commit details
    Browse the repository at this point in the history
  59. Better handling of locals

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    e963765 View commit details
    Browse the repository at this point in the history
  60. Only report non-trivial cycles

    It is necessary for the following code to pass the check:
    
        enum Color(val x: Int):
          case Violet extends Color(Green.x + 1)
          case Green  extends Color(3)
    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    13f804f View commit details
    Browse the repository at this point in the history
  61. Reclassify test

    The test now has a cyclic object initialization error.
    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5f81ee6 View commit details
    Browse the repository at this point in the history
  62. Fix access local var

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    eacbd1b View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    cf925b2 View commit details
    Browse the repository at this point in the history
  64. Handle local variables properly

    With the environment in values and values in environment, the domain is still finite because the
    abstract value `OfClass` does not exceed a constant height due to widening.
    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2a73df2 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    1c66251 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    7ade2e7 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    0d3ca9d View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    e8520c2 View commit details
    Browse the repository at this point in the history
  69. Workaround bug in typer

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    2467571 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    dd3ef2c View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    9bc0df6 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    1b1727e View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    602b775 View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    3c07f62 View commit details
    Browse the repository at this point in the history
  75. Handle by-name parameters

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5dfaf0b View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    4b8ba9b View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    6d27960 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    60ef6d1 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    1a540ee View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    0fa9779 View commit details
    Browse the repository at this point in the history
  81. Fix error message printing

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    19a88de View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    fb1f0c2 View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    d273c0f View commit details
    Browse the repository at this point in the history
  84. Configuration menu
    Copy the full SHA
    9d9bcb1 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    58fce39 View commit details
    Browse the repository at this point in the history
  86. More tests for array

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    1a9a744 View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    1bde3a5 View commit details
    Browse the repository at this point in the history
  88. Context-sensitive closures

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    9799d50 View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    0a23d2c View commit details
    Browse the repository at this point in the history
  90. Support region annotation

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    25888f3 View commit details
    Browse the repository at this point in the history
  91. Tweak default: widen 1

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    6a6040e View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    1c30928 View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    db976fc View commit details
    Browse the repository at this point in the history
  94. Configuration menu
    Copy the full SHA
    4672e4b View commit details
    Browse the repository at this point in the history
  95. Add global init checking test cases

    q-ata authored and liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5c46833 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    fb21862 View commit details
    Browse the repository at this point in the history
  97. Fix tests

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    557fbc7 View commit details
    Browse the repository at this point in the history
  98. Align syntax with paper

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4d4518a View commit details
    Browse the repository at this point in the history
  99. Configuration menu
    Copy the full SHA
    3e64c6b View commit details
    Browse the repository at this point in the history
  100. Fix typos

    Co-authored-by: EnzeXing <58994529+EnzeXing@users.noreply.github.com>
    Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
    3 people committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    1aacd59 View commit details
    Browse the repository at this point in the history
  101. Fix typo

    Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
    liufengyun and olhotak committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    a8d0b7f View commit details
    Browse the repository at this point in the history
  102. Fix typo

    Co-authored-by: Ondřej Lhoták <olhotak@uwaterloo.ca>
    liufengyun and olhotak committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    47bbeba View commit details
    Browse the repository at this point in the history
  103. Add documentation to code

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    d79c1ec View commit details
    Browse the repository at this point in the history
  104. Apply suggestions from code review

    Co-authored-by: q-ata <24601033+q-ata@users.noreply.github.com>
    liufengyun and q-ata committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    81e0562 View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    4cdfa54 View commit details
    Browse the repository at this point in the history
  106. Add comment to code

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    b5d8531 View commit details
    Browse the repository at this point in the history
  107. Fix typo in doc

    Co-authored-by: EnzeXing <58994529+EnzeXing@users.noreply.github.com>
    liufengyun and EnzeXing committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    0638458 View commit details
    Browse the repository at this point in the history
  108. Handle return properly

    liufengyun committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    daf12de View commit details
    Browse the repository at this point in the history
  109. Configuration menu
    Copy the full SHA
    ccb7983 View commit details
    Browse the repository at this point in the history
  110. Configuration menu
    Copy the full SHA
    cade1c7 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

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

Commits on Jun 15, 2023

  1. Configuration menu
    Copy the full SHA
    473e765 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce093cb View commit details
    Browse the repository at this point in the history