From: Tom Lane <tgl@sss.pgh.pa.us>
To: zoulx1982@163.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6460: routine my_log2 use incorrect data type ?
Date: Fri, 17 Feb 2012 17:27:04 -0500
Message-ID: <5689.1329517624@sss.pgh.pa.us> (raw)
In-Reply-To: <E1RyGKF-0007i4-6P@wrigleys.postgresql.org>
References: <E1RyGKF-0007i4-6P@wrigleys.postgresql.org>
zoulx1982@163.com writes:
> I startup postgres in win server 2008 64-bit with
> shared_buffers=1073741819, but find it doesn't work.
Well, that's hardly the fault of my_log2. What you should have gotten
is
FATAL: requested shared memory size overflows size_t
and I do get that when I try that value. Apparently the overflow check
in mul_size() is broken in your build. Did you build it yourself, and
if so with which compiler and what compilation options? If you didn't
build it yourself, where did you get it from?
> size_t in win64 is 8 bytes, so add_size and mul_size can't check overflow,
Sure they can. Or at least if they can't, it's not because of size_t
being 8 bytes. That code works fine on every other 64-bit platform.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, zoulx1982@163.com
Subject: Re: BUG #6460: routine my_log2 use incorrect data type ?
In-Reply-To: <5689.1329517624@sss.pgh.pa.us>
References: <E1RyGKF-0007i4-6P@wrigleys.postgresql.org> <5689.1329517624@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox