Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b99cfb

Browse files
committed
Avoid palloc before CurrentMemoryContext is set up on win32
Instead, write the unconverted output - it will be in the wrongencoding, but at least we don't crash.Rushabh Lathia
1 parenteff9335 commit7b99cfb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/utils/error/elog.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,10 +1658,14 @@ write_console(const char *line, int len)
16581658
/*
16591659
* WriteConsoleW() will fail of stdout is redirected, so just fall through
16601660
* to writing unconverted to the logfile in this case.
1661+
*
1662+
* Since we palloc the structure required for conversion, also fall through
1663+
* to writing unconverted if we have not yet set up CurrentMemoryContext.
16611664
*/
16621665
if (GetDatabaseEncoding()!=GetPlatformEncoding()&&
16631666
!in_error_recursion_trouble()&&
1664-
!redirection_done)
1667+
!redirection_done&&
1668+
CurrentMemoryContext!=NULL)
16651669
{
16661670
WCHAR*utf16;
16671671
intutf16len;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp