Re: [HACKERS] SerializedSnapshotData alignment
От | Thomas Munro |
---|---|
Тема | Re: [HACKERS] SerializedSnapshotData alignment |
Дата | |
Msg-id | CAEepm=0EejF1m+cybaf8YD=ae+y-NE9r54_9=q5gTyLJpiVcjQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] SerializedSnapshotData alignment (Noah Misch <noah@leadboat.com>) |
Ответы |
Re: [HACKERS] SerializedSnapshotData alignment
|
Список | pgsql-hackers |
On Mon, Feb 27, 2017 at 2:18 PM, Noah Misch <noah@leadboat.com> wrote: > I wondered the same thing; if nothing else, why don't protosciurus and > castoroides fail the same way? They do use older compilers, "Sun C 5.10 > SunOS_sparc 2009/06/03" and gcc 3.4.3. I have "Sun C 5.12 SunOS_sparc > 2011/11/16" and gcc 4.9.2, both of which are alignment-sensitive in several > configurations, according to the attached test program. However, in a 32-bit > build with this Sun C, I don't get alignment-related bus errors. (Those > animals build 64-bit, so this isn't the full story.) It's been a while but I seem to recall that Sun C defaulted to a -xmemalign setting that tolerated misaligned reads in 32 bit builds, but used a different default on 64 bit builds. "Solaris Application Programming" 5.8.5 seems to confirm this: "For 32-bit applications, since Sun Studio 9, the default is for the compiler to assume 8-byte alignment and to trap and correct any misaligned data accesses. For 64-bit applications, the compiler assumes 8-byte alignment, but the application will SIGBUS on a misaligned access." Yet castoroides seems to be building with -m64, so that's not the explanation. Could it be correctly aligned by coincidence? -- Thomas Munro http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: