Commit 0bc95b0
committed
Avoid StackOverflowError if write circular reference exception (#54147)
We should never write a circular reference exception as we will fail a
node with StackOverflowError. However, we have one in #53589.
I tried but failed to find its location. With this commit, we will avoid
StackOverflowError in production and detect circular exceptions in
tests.
Closes #535891 parent 62c1e3d commit 0bc95b0
File tree
3 files changed
+46
-5
lines changed- server/src
- main/java/org/elasticsearch
- common/io/stream
- test/java/org/elasticsearch/common/io/stream
3 files changed
+46
-5
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
| 731 | + | |
| 732 | + | |
732 | 733 | | |
733 | 734 | | |
734 | 735 | | |
| |||
740 | 741 | | |
741 | 742 | | |
742 | 743 | | |
743 | | - | |
| 744 | + | |
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
| |||
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
861 | 866 | | |
862 | 867 | | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
863 | 871 | | |
864 | 872 | | |
865 | 873 | | |
| |||
982 | 990 | | |
983 | 991 | | |
984 | 992 | | |
985 | | - | |
| 993 | + | |
986 | 994 | | |
987 | | - | |
| 995 | + | |
988 | 996 | | |
989 | 997 | | |
990 | 998 | | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
991 | 1003 | | |
992 | 1004 | | |
993 | 1005 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
848 | 852 | | |
849 | 853 | | |
850 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
851 | 879 | | |
0 commit comments