clkao / plv8js-migrated

Automatically exported from code.google.com/p/plv8js
Other
0 stars 0 forks source link

Regression test failures when using plv8 with 9.5 because of changes with FLEXIBLE_ARRAY_MEMBER #110

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When building the code on at least Postgres master at 09d8d11 (oops), 
regression tests are failing in multiple places because of an incorrect 
calculation the allocation size used for ParamListInfoData that is now using 
FLEXIBLE_ARRAY_MEMBER. Here is an example of failure:
+ WARNING: problem in alloc set SPI Proc: detected write past chunk end in 
block 0xdc1ff0, chunk 0xdc2098

Attached is a patch fixing the problem by using offsetof() instead of sizeof() 
in plv8_setup_variable_paramlist. Note that this solution is compatible with 
~9.4 and I think that this way the allocation calculation is more correct.

Original issue reported on code.google.com by michael....@gmail.com on 26 Feb 2015 at 2:00

Attachments: