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

Commitd50e256

Browse files
committed
Fix another place that was assuming that a local variable declared as
"struct varlena" would be at least word-aligned. Per buildfarm resultsfrom gypsy_moth. I did a little bit of trawling for other instances ofthis coding pattern, and didn't find any; but if we turn up any moreof them I think we'd better revert the "char [4]" patch and find anotherway of making tuptoaster.c alignment-safe.
1 parente04fa58 commitd50e256

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/backend/storage/large_object/inv_api.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
*
2626
* IDENTIFICATION
27-
* $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.127 2008/01/01 19:45:52 momjian Exp $
27+
* $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.128 2008/03/01 19:26:22 tgl Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
@@ -516,7 +516,8 @@ inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes)
516516
struct
517517
{
518518
byteahdr;
519-
chardata[LOBLKSIZE];
519+
chardata[LOBLKSIZE];/* make struct big enough */
520+
int32align_it;/* ensure struct is aligned well enough */
520521
}workbuf;
521522
char*workb=VARDATA(&workbuf.hdr);
522523
HeapTuplenewtup;
@@ -707,7 +708,8 @@ inv_truncate(LargeObjectDesc *obj_desc, int len)
707708
struct
708709
{
709710
byteahdr;
710-
chardata[LOBLKSIZE];
711+
chardata[LOBLKSIZE];/* make struct big enough */
712+
int32align_it;/* ensure struct is aligned well enough */
711713
}workbuf;
712714
char*workb=VARDATA(&workbuf.hdr);
713715
HeapTuplenewtup;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp