Thread: BUG #1718: geqo_selection.c:linear()
The following bug has been logged online: Bug reference: 1718 Logged by: Bug Finder Email address: bug@zedware.org PostgreSQL version: 8.0.3 Operating system: Linux Description: geqo_selection.c:linear() Details: In geqo_selection.c, function linear() may return a value equals to pool_size, and cause geqo_selection() to visit invalid array member. In linear(), assume bias is 2, and geqo_rand() returns 1. Then index will equal to pool_size.
"Bug Finder" <bug@zedware.org> writes: > In geqo_selection.c, function linear() may > return a value equals to pool_size, and cause > geqo_selection() to visit invalid array member. Good catch. I wonder whether roundoff error couldn't lead to trying to call sqrt() with a value slightly less than zero, too. Repaired in our CVS for next releases --- thanks for the report! regards, tom lane