Re: [HACKERS] [COMMITTERS] pgsql: Close some holes in BRIN page assignment

2015-08-13 Thread Andres Freund
On 2015-08-13 00:24:29 -0300, Alvaro Herrera wrote:
 Andres Freund wrote:
  On 2015-08-12 16:08:08 -0300, Alvaro Herrera wrote:
   Alvaro Herrera wrote:
Close some holes in BRIN page assignment
   
   buildfarm evidently didn't like this one :-(
  
  clang seems to see a (the?) problem:
 
 Ahh, right.  There's an identical problem in the other function
 (brin_doupdate); maybe the conditional there is more complicated than it
 wants to analyze.  I was trying randomized memory and wasn't finding
 anything ...
 
 BTW I looked around the buildfarm and couldn't find a single member that
 displayed these warnings :-(

I tripped on clang 3.7 (unreleased) and a fairly extensive set of
warning flags (-Weverything + -Wno-... of the stupid ones)...

FWIW, this very likely would have tripped in valgrind. Just running that
single test will not even be too slow.

Regards,

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [COMMITTERS] pgsql: Close some holes in BRIN page assignment

2015-08-12 Thread Andres Freund
On 2015-08-12 16:08:08 -0300, Alvaro Herrera wrote:
 Alvaro Herrera wrote:
  Close some holes in BRIN page assignment
 
 buildfarm evidently didn't like this one :-(

clang seems to see a (the?) problem:

/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:357:6: 
warning: variable 'extended' is used uninitialized whenever 'if'
  condition is false [-Wsometimes-uninitialized]
if (!BufferIsValid(*buffer))
^~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:371:6: note: 
uninitialized use occurs here
if (extended)
^~~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:357:2: note: 
remove the 'if' if its condition is always true
if (!BufferIsValid(*buffer))
^~~~
/home/andres/src/postgresql/src/backend/access/brin/brin_pageops.c:330:16: 
note: initialize the variable 'extended' to silence this warning
boolextended;

Looks to me like it's right. That also explains why it's failing on a
fairly random selection of platforms and compilers...

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [COMMITTERS] pgsql: Close some holes in BRIN page assignment

2015-08-12 Thread Alvaro Herrera
Andres Freund wrote:
 On 2015-08-12 16:08:08 -0300, Alvaro Herrera wrote:
  Alvaro Herrera wrote:
   Close some holes in BRIN page assignment
  
  buildfarm evidently didn't like this one :-(
 
 clang seems to see a (the?) problem:

Ahh, right.  There's an identical problem in the other function
(brin_doupdate); maybe the conditional there is more complicated than it
wants to analyze.  I was trying randomized memory and wasn't finding
anything ...

BTW I looked around the buildfarm and couldn't find a single member that
displayed these warnings :-(

 Looks to me like it's right. That also explains why it's failing on a
 fairly random selection of platforms and compilers...

Yeah ...

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] [COMMITTERS] pgsql: Close some holes in BRIN page assignment

2015-08-12 Thread Alvaro Herrera
Alvaro Herrera wrote:
 Close some holes in BRIN page assignment

buildfarm evidently didn't like this one :-(

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training  Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers