Re: pgindent run coming

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgindent run coming
Дата
Msg-id 200906100321.n5A3LqR03959@momjian.us
обсуждение исходный текст
Ответ на pgindent run coming  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pgindent run coming  (Bruce Momjian <bruce@momjian.us>)
Re: pgindent run coming  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Bruce Momjian wrote:
> It is time to run pgindent on CVS HEAD for 8.4.  I am thinking of
> running it at zero-hour GMT tomorrow, meaning five hours from now. 
> Any objections?

I ran pgindent and was concerned enough about the results so I am
posting here rather than applying any changes.  I used the old way of
generating typedefs and the new buildfarm method output from diffs from
http://www.pgbuildfarm.org/cgi-bin/typedefs.pl.  The typedef lists and
diff are here:
http://momjian.us/expire/pgindent/

You can see the typedef lists are of similar size:
2775 typedefs.old2123 typedefs.new

and the diffs generates are a similar number of lines:133657 diff.old_typedefs135042 diff.new_typedefs

I saw a few odd things.  Most importantly, it seems 'stat' was
introduced as a typedef on _both_ lists, yielding weird changes like:

-   ret = stat(indir, &st);
+   ret = stat  (indir, &st);

and even odder:

-                       stat->weight |= 1 << 3;
+                       stat      ->weight |= 1 << 3;

stat was not a typedef in 8.3 or pgindent would have done this for 8.3,
but I can't figure out what has changed to make it appear for 8.4.  I
see this in the objdump output (my OS has not changed from 8.3):
31357  EXCL   0      0      00003e64 97648  /usr/include/time.h31358  EXCL   0      0      00007638 97624
/usr/include/sys/time.h31359 EXCL   0      0      00000000 97648  /usr/include/time.h31360  EXCL   0      0
00001dff25540  /usr/include/fcntl.h31361  BINCL  0      0      000144be 449667 /usr/include/sys/stat.h
 
31362  LSYM   0      0      00000000 449691
ostat:T(51,1)=s64st_dev:(0,9),0,16;st_ino:(9,20),32,32;st_mode:(9,22),64,16;st_nlink:(9,23),80,16;st_uid:(0,9),96,16;st_gid:(0,9),112,16;st_rdev:(0,9),128,16;st_size:(0,3),160,32;st_atimespec:(48,2),192,64;st_mtimespec:(48,2),256,64;st_ctimespec:(48,2),320,64;st_blksize:(0,3),384,32;st_blocks:(0,3),416,32;st_flags:(0,5),448,32;st_gen:(0,5),480,32;;
31363  LSYM   0      0      00000000 450042
stat32:T(51,2)=s96st_dev:(9,17),0,32;st_ino:(9,20),32,32;st_mode:(9,22),64,16;st_nlink:(9,23),80,16;st_uid:(9,28),96,32;st_gid:(9,19),128,32;st_rdev:(9,17),160,32;st_atimespec:(48,2),192,64;st_mtimespec:(48,2),256,64;st_ctimespec:(48,2),320,64;st_size:(0,3),384,32;st_size1:(0,3),416,32;st_blocks:(0,3),448,32;st_blocks1:(0,3),480,32;st_blksize:(0,5),512,32;st_flags:(0,5),544,32;st_gen:(0,5),576,32;st_lspare:(0,3),608,32;st_qspare:(51,3)=ar(0,1);0;3;(0,3),640,128;;

-->    31364  LSYM   0      0      00000000 450510
stat:T(51,4)=s96st_dev:(9,17),0,32;st_ino:(9,20),32,32;st_mode:(9,22),64,16;st_nlink:(9,23),80,16;st_uid:(9,28),96,32;st_gid:(9,19),128,32;st_rdev:(9,17),160,32;st_atimespec:(48,2),192,64;st_mtimespec:(48,2),256,64;st_ctimespec:(48,2),320,64;st_size:(9,24),384,64;st_blocks:(9,8),448,64;st_blksize:(0,5),512,32;st_flags:(0,5),544,32;st_gen:(0,5),576,32;st_lspare:(0,3),608,32;st_qspare:(51,5)=ar(0,1);0;1;(9,8),640,128;;

It is coming from the postgres binary.

The typedef is coming from the indicated line, and from
/usr/include/sys/stat.h, where there is no typedef for stat.  Obviously
Linux or the buildfarm is finding the same issue, but I have no idea
why.

My only guess right now is that we are linking postgres differently than
we did for 8.3 and that is bringing in new wrong typedef symbols.

I will have to research this further tomorrow.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Not quite a security hole in internal_in
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgindent run coming