/[Apache-SVN]
ViewVC logotype

Revision 665566


Jump to revision: Previous Next
Author: dweatherford
Date: Sat Mar 8 05:51:24 2008 UTC (16 years, 8 months ago)
Changed paths: 1
Log Message:
[thrift] php thrift_protocol crash fixes

Summary: The convert_to_*_ex functions were being used improperly resulting
  in heap corruption in some cases; I just switched everything over to the
  non-ex versions since it shouldn't matter if I modify the value being
  serialized in place to coerce it to the proper type.

  Also fixed a potential crash for map, set, and list types when not passed
  an array, by first attempting an array conversion and then throwing a
  tprotocolexception if that doesn't succeed. (Actually, PHP might fatal there
  instead, it wasn't immediately clear from reading the code if that would
  be the case).

Reviewed by: marcel
Test plan: Ran under php-5.2.5, debug and release builds. No more heap corruption
  or memory leak complaints (the latter also a side effect of undesired zval
  reference separation).
Revert: only if you love SIGSEGV


Changed paths

Path Details
Directoryincubator/thrift/trunk/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26