Thread: Fix for possible pg_dump core dump
I've fixed this bug in 7.1RC1. It may have been causing core dumps by dereferencing a null function pointer. As it was the Sun compiler flagged it as an error. (SC5.0 on Solaris 2.6.) Interestingly other compilers on other platforms accept a function as a controlling expression in an if statement without complaint. That expression should have scalar type, i.e. either arithmetic or pointer. This test program demonstrates Sun catching the error. $ cc funcptr.c "funcptr.c", line 13: controlling expressions must have scalar type cc: acomp failed for funcptr.c -- Pete Forman -./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent pete.forman@westerngeco.com -./\.- opinion of Schlumberger, Baker http://www.crosswinds.net/~petef -./\.- Hughes or their divisions.
Attachment
At 10:20 27/03/01 +0100, Pete Forman wrote: >I've fixed this bug in 7.1RC1. It may have been causing core dumps by >dereferencing a null function pointer. As it was the Sun compiler >flagged it as an error. (SC5.0 on Solaris 2.6.) > Thanks for this, but Tom applied a similar patch a few days ago. ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
Philip Warner writes:> At 10:20 27/03/01 +0100, Pete Forman wrote:> >I've fixed this bug in 7.1RC1. It may have been causingcore> >dumps by dereferencing a null function pointer. As it was the Sun> >compiler flagged it as an error. (SC5.0on Solaris 2.6.)> >> > Thanks for this, but Tom applied a similar patch a few days ago. I can see Steve Nicolai's patch now. I had looked in the archives before posting but got 190 hits on pg_backup_null with no option to sort by date. Trying again on Google Groups this time gets me straight there. -- Pete Forman -./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent pete.forman@westerngeco.com -./\.- opinion of Schlumberger, Baker http://www.crosswinds.net/~petef -./\.- Hughes or their divisions.