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

Commit5735efe

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 parente49ad77 commit5735efe

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
@@ -1668,10 +1668,14 @@ write_console(const char *line, int len)
16681668
/*
16691669
* WriteConsoleW() will fail of stdout is redirected, so just fall through
16701670
* to writing unconverted to the logfile in this case.
1671+
*
1672+
* Since we palloc the structure required for conversion, also fall through
1673+
* to writing unconverted if we have not yet set up CurrentMemoryContext.
16711674
*/
16721675
if (GetDatabaseEncoding()!=GetPlatformEncoding()&&
16731676
!in_error_recursion_trouble()&&
1674-
!redirection_done)
1677+
!redirection_done&&
1678+
CurrentMemoryContext!=NULL)
16751679
{
16761680
WCHAR*utf16;
16771681
intutf16len;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp