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

Commit47a86fa

Browse files
committed
Add code comment about Linux stack randomization and shared memory.
1 parent802c7aa commit47a86fa

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.480 2006/02/01 00:31:59 momjian Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.481 2006/02/0116:00:06 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -3336,7 +3336,18 @@ SubPostmasterMain(int argc, char *argv[])
33363336
/* Need a PGPROC to run CreateSharedMemoryAndSemaphores */
33373337
InitProcess();
33383338

3339-
/* Attach process to shared data structures */
3339+
/*
3340+
*Attach process to shared data structures. If testing
3341+
*EXEC_BACKEND on Linux, you must run this as root
3342+
*before starting the postmaster:
3343+
*
3344+
*echo 0 >/proc/sys/kernel/randomize_va_space
3345+
*
3346+
*This prevents a randomized stack base address that causes
3347+
*child shared memory to be at a different address than
3348+
*the parent, making it impossible to attached to shared
3349+
*memory. Return the value to '1' when finished.
3350+
*/
33403351
CreateSharedMemoryAndSemaphores(false,0);
33413352

33423353
/* And run the backend */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp