Commit 3fbebea
fix coredump in interconnect_abort_callback
In the exception handling logic of interconnect_abort_callback, we invoked
elog(ERROR) without properly handling the PostgreSQL exception using
PG_TRY/PG_CATCH. This oversight could lead to the process exiting abnormally.
When an uncaught PostgreSQL exception occurs in the exception handling
function registered via RegisterResourceReleaseCallback, the exception
callback function is recursively invoked. This recursion may eventually
cause the errordata stack to exceed its allocated size, triggering an
ERROR(PANIC) and causing the process to terminate abnormally.1 parent fb86851 commit 3fbebea
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1895 | 1895 | | |
1896 | 1896 | | |
1897 | 1897 | | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
1898 | 1914 | | |
1899 | 1915 | | |
1900 | 1916 | | |
| |||
1910 | 1926 | | |
1911 | 1927 | | |
1912 | 1928 | | |
1913 | | - | |
| 1929 | + | |
1914 | 1930 | | |
1915 | 1931 | | |
1916 | 1932 | | |
| |||
0 commit comments