Blog entries on August 2005

  • "Submitting a bug to PHP" - The novel

    By Nuno Mariz, on 29 August 2005 @ 15:54
    This is my first(and the last) time of an attempt to submit a bug to PHP. I am using PDO in PHP5 and my Apache gets a "Segmentation Fault" when I execute an invalid SQL statement.
    [26 Aug 8:02pm CEST] nmariz at estadias dot com
    
    Description:
    ------------
    Segmentation fault in Apache when executing an invalid SQL.
    
    apache error.log:
    
    [Fri Aug 26 18:10:42 2005] [notice] child pid 26519 exit signal
    Segmentation fault (11)
    
    Actual result:
    --------------
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 1079565216 (LWP 28567)]
    0x40865cf5 in _efree (ptr=0x83bbf58) at
    /root/software/php-5.1.0RC1/Zend/zend_alloc.c:302
    302             REMOVE_POINTER_FROM_LIST(p);
    (gdb) bt
    #0  0x40865cf5 in _efree (ptr=0x83bbf58) at
    /root/software/php-5.1.0RC1/Zend/zend_alloc.c:302
    #1  0x40727109 in pdo_mysql_stmt_dtor (stmt=0x0, tsrm_ls=0x817ecf8) at
    /root/software/php-5.1.0RC1/ext/pdo_mysql/mysql_statement.c:45
    
    (...)
    
    [26 Aug 9:29pm CEST] xxx@php.net
    
    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves. 
    
    A proper reproducing script starts with < ?php and ends with ?>,
    is max. 10-20 lines long and does not require any external 
    resources such as databases, etc.
    
    If possible, make the script source available online and provide
    an URL to it here. Try to avoid embedding huge scripts into the report.
    
    [29 Aug 10:42am CEST] nmariz at estadias dot com
    
    Segmentation fault when executing an invalid SQL statement:
    
    < ?php
    (...)
    // invalid sql statement
    $query = 'SELECT id name,text FROM modules';
    $stmt = $this->dbconn->query($query);
    $result = $stmt->fetchAll();
    $stmt = null;
    return $result
    (...)
    ?>
    
    [29 Aug 1:24pm CEST] xxx@php.net
    
    What part in "a short but complete example script" did you not
    understand?
    
    
    [29 Aug 5:00pm CEST] nmariz at estadias dot com
    
    What part in "Segmentation fault when executing an invalid
    SQL(_____ANY_____) statement" did you not understand?
    I think that you don't need more code to understand what i mean.
    
    [29 Aug 5:07pm CEST] xxx@php.net
    
    I think you don't understand that I am very very lazy.
    And that your problem _might_ be somewhere ELSE than in the query part.
    So either give the full code or go away.
    
    Unbelievable!
    UPDATE: After i had submitted the code that he asked, the guy simply erased all logs and submitted this:
    [29 Aug 11:34pm CEST] xxx@php.net
    
    Thank you for this bug report. To properly diagnose the problem, we
    need a short but complete example script to be able to reproduce
    this bug ourselves. 
    
    A proper reproducing script starts with < ?php and ends with ?>,
    is max. 10-20 lines long and does not require any external 
    resources such as databases, etc.
    
    If possible, make the script source available online and provide
    an URL to it here. Try to avoid embedding huge scripts into the report.
    
    You can see the log in here.