pgsql: Fix unaligned memory access in xlog parsing due to replication o

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix unaligned memory access in xlog parsing due to replication o
Date: 2015-05-01 09:55:08
Message-ID: E1Yo7f2-00036T-LT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix unaligned memory access in xlog parsing due to replication origin patch.

ParseCommitRecord() accessed xl_xact_origin directly. But the chunks in
the commit record's data only have 4 byte alignment, whereas
xl_xact_origin's members require 8 byte alignment on some
platforms. Update comments to make not of that and copy the record to
stack local storage before reading.

With help from Stefan Kaltenbrunner in pinning down the buildfarm and
verifying the fix.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1db12da85bee7a01abfbbf2798904347e4d9515a

Modified Files
--------------
src/backend/access/rmgrdesc/xactdesc.c | 9 ++++++---
src/include/access/xact.h | 5 +++--
2 files changed, 9 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-05-01 10:26:16 Re: pgsql: Introduce replication progress tracking infrastructure.
Previous Message Heikki Linnakangas 2015-05-01 05:07:04 pgsql: Fix pg_rewind regression failure after "fast promotion"