On Sat, Jun 25, 2016 at 6:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
If that is the explanation, I'm suspicious that it's got something to do with the interaction of a static inline-able (single-call-site) function and taking the address of a formal parameter. We certainly have multiple other instances of each thing, but maybe not both at the same place. This leads to a couple of suggestions for dodging the problem:
2. Don't pass the original formal parameter to get_foreign_key_join_selectivity, ie do something like
The problem appears to be related to 'taking the address of a formal parameter'. NOT passing the original formal parameter to get_foreign_key_join_selectivity fixes it (dodges the problem) on VS2013. Resulting binaries seem to work fine as initdb doesn't experience child process crash anymore. 'vcregress check' does not report any failures also.
Anyways, We have decided to use VS2015 tool chain for 9.6beta2 release.
Thanks everyone for the valuable input and help. Appreciate it!