View Issue Details

IDProjectCategoryView StatusLast Update
0000418Xdebugpublic2009-03-28 20:37
Reporterguenter Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0000418: compilation breaks with CodeWarrior for NetWare with versions > 2.0.0
Description

Hi,
starting from xdebug 2.0.1 compiling the extension with CodeWarrior for NetWare breaks in xdebug_code_coverage.c, and I'm a bit clueless why....
then I tried to compile xdebug 2.0.3 on Linux, and while it doey not break I see warnings at exactly same places in file xdebug_code_coverage.c ...

Additional Information

Compile error with CodeWarrior for NetWare (xdebug 2.0.3):

Compiling xdebug.c...
Compiling xdebug_code_coverage.c...
xdebug_code_coverage.c:233: illegal implicit conversion from 'int' to
xdebug_code_coverage.c:233: 'void *'
xdebug_code_coverage.c:272: illegal operand
xdebug_code_coverage.c:312: illegal operand

Errors caused tool to abort.

Compile warning with gcc 4.2.1 on SuSE Linux (xdebug 2.0.3):

gcc -I. -I/home/hacki/projects/php5/xdebug-2.0.3 -DPHP_ATOM_INC -I/home/hacki/projects/php5/xdebug-2.0.3/include -I/home/hacki/projects/php5/xdebug-2.0.3/main -I/home/hacki/projects/php5/xdebug-2.0.3 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O0 -c /home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c -fPIC -DPIC -o .libs/xdebug_code_coverage.o
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c: In function 'prefill_from_oparray':
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c:233: warning: assignment makes pointer from integer without a cast
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c: In function 'prefill_from_function_table':
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c:272: warning: comparison between pointer and integer
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c: In function 'xdebug_prefill_code_coverage':
/home/hacki/projects/php5/xdebug-2.0.3/xdebug_code_coverage.c:312: warning: comparison between pointer and integer

TagsNo tags attached.
Operating SystemNetWare, Linux
PHP Version5.2.6

Activities

guenter

2008-11-08 17:54

reporter   ~0000896

sorry for the wrong category - please change to 'installation'!

guenter

2008-11-08 19:58

reporter   ~0000897

Further investigation shows that zend_op_array is defined in ./Zend/zend_compile.h, and its last member is defined as:
void reserved[ZEND_MAX_RESERVED_RESOURCES];
and so in turn when I add casts to lines 233, 272, 312 (now 239, 278, 318 in CVS) in xdebug_code_coverage.c compile doesnt break:
--- xdebug_code_coverage.c.orig Wed Apr 09 16:52:04 2008
+++ xdebug_code_coverage.c Sat Nov 08 19:46:13 2008
@@ -230,7 +230,7 @@
unsigned int i;
xdebug_set
set = NULL;

  • opa->reserved[XG(reserved_offset)] = 1;
  • opa->reserved[XG(reserved_offset)] = (void*)1;

    #ifdef ZEND_ENGINE_2
    /* Check for abstract methods and simply return from this function in those
    @@ -269,7 +269,7 @@

    new_filename = va_arg(args, char*);
    if (opa->type == ZEND_USER_FUNCTION) {

  • if (opa->reserved[XG(reserved_offset)] != 1/ && opa->filename && strcmp(opa->filename, new_filename) == 0)/) {
  • if (opa->reserved[XG(reserved_offset)] != (void)1/ && opa->filename && strcmp(opa->filename, new_filename) == 0)*/) {
    prefill_from_oparray(opa->filename, opa TSRMLS_CC);
    }
    }
    @@ -309,7 +309,7 @@

    void xdebug_prefill_code_coverage(zend_op_array *op_array TSRMLS_DC)
    {

  • if (op_array->reserved[XG(reserved_offset)] != 1) {
  • if (op_array->reserved[XG(reserved_offset)] != (void*)1) {
    prefill_from_oparray(op_array->filename, op_array TSRMLS_CC);
    }

though I have not digged further through your code, and I doubt that this is the right fix.

derick

2009-03-28 20:37

administrator   ~0000944

This is actually the correct patch, so thanks! I've committed this to CVS now.

Issue History

Date Modified Username Field Change
2008-11-08 17:47 guenter New Issue
2008-11-08 17:54 guenter Note Added: 0000896
2008-11-08 19:58 guenter Note Added: 0000897
2009-03-28 20:37 derick Note Added: 0000944
2009-03-28 20:37 derick Status new => closed
2009-03-28 20:37 derick Resolution open => fixed
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)