Christoph
Christoph

Reputation: 968

Quickform2's HTML_QuickForm2_Renderer_Proxy triggers a segfault

The code that I'm running is:

HTML_QuickForm2_Renderer::factory('array');

That's it. In order to test this I pared it down to that line in a simple test script. In HTML_QuickForm2_Renderer_Proxy::__construct(), the line where it assigns the renderer to the local property:

$this->_renderer = $renderer;

triggers a segfault. The error that's logged out is

php-fpm[996455]: segfault at 10000000f ip 00007f3e91ac65e4 sp 
00007fff1915a3c8 error 4 in xdebug.so[7f3e91aa6000+56000]
Oct 14 18:36:48 my_php_server kernel: Code: 48 89 43 10 49 8b 74 24 10 48 
89 c7 e8 15 39 ff ff 48 8b 43 10 c6 04 28 00 48 89 d8 5b 5d 41 5c c3 0f 1f 
44 00 00 f3 0f 1e fa <48> 8b 7f 10 48 85 ff 74 0b e9 5e 2a ff ff 66 0f 1f 44 
00 00 c3 0f

The arguments passed into the constructor are as follows:

HTML_QuickForm2_Renderer_Array::__set_state(array(
   'options' => 
  array (
    'group_hiddens' => true,
    'required_note' => '<em>*</em> denotes required fields.',
    'errors_prefix' => 'Invalid information entered:',
    'errors_suffix' => 'Please correct these fields.',
    'group_errors' => false,
    'static_labels' => false,
  ),
   'jsBuilder' => NULL,
   'array' => 
  array (
  ),
   'containers' => 
  array (
  ),
   'hasRequired' => false,
   'styles' => 
  array (
  ),
))

$pluginClasses
array (
)

Just to test, I changed the body of the constructor to the following:

$_renderer      = $renderer;
$this->_pluginClasses = &$pluginClasses;
$this->_renderer = $_renderer;

The line where it assigns the object to the local variable executes without error. But when it gets to the line where it assigns the object to the member property, the segfault is triggered

It's on a CentOS 8 box running php v8.1 and AFAIK QuickForm2 is supposed to work on v8.1. Has anyone else run across this? If so, how did you get it to work?

thnx,
Christoph

Upvotes: 0

Views: 35

Answers (0)

Related Questions