Menu

#9 encoding fails under 64bIt system

closed-fixed
nobody
None
5
2010-06-11
2006-06-23
Anonymous
No

encoding config-files on a x86_64 (AMD64) fails for
some of the given example config-files.
e.g. docsis20.cfg
a little debugging reveals the following:

in routine encode_one_file(...) [docsis.c]

/* walk the tree to find out how much memory we need */
/* leave some room for CM MIC, CMTS MIC, pad */
buflen = tlvtreelen (global_tlvtree_head);

buflen on a 32bit system is 1853

but on the 64bit system i get a buflen of 1762326

the values that were read match on both systems (set
DEBUG for docsis_encode.c and the output was the same),
but - imho -something goes wrong within the creation of
the TLV's.

version: docsis-0.9.5

distorted@gmx.de

Discussion

  • BlueLightning

    BlueLightning - 2007-02-05

    Logged In: YES
    user_id=1106877
    Originator: NO

    I have the same probleme. After two days of making setting with dhcpd/tftp/time and reendcode the files, i put my laptop that has an 32bit CPU and OS and it works fine!!!

    After that i check the files generated by docsis compiled on 64bit OS and docsis compiled on 32bit and the result was very strange: files has differences. I run the docsis compiled on 32bit on 64bit machine with 64bit OS and it works fine! The same probleme i had on another 64bit machine.

    After that i found the Bugs Tracking System and when i want to sumbit the bug .. i found that it was allready submited :)

    I hope the probleme will be soon repaired.

     
  • BlueLightning

    BlueLightning - 2007-02-05

    Logged In: YES
    user_id=1106877
    Originator: NO

    The answer was in an old bug report:

    after a change in md5.h

    from

    /* UINT4 defines a four byte word */
    typedef unsigned long int UINT4;#

    to
    /* UINT4 defines a four byte word */
    typedef unsigned int UINT4;

     
  • Nobody/Anonymous

    Logged In: NO

    you can run the 32 bit version with ia32-libs
    http://www.debian-administration.org/articles/531

    dont forget to run run ldconfig at the end.

     
  • BlueLightning

    BlueLightning - 2008-03-23

    Logged In: YES
    user_id=1106877
    Originator: NO

    Hy. I found that docsis is not compiling corectly at all on 64 bit sistems. There are a lot of things that should be made portable between 32bit and 64bit. After i change the code for variables like short/int/long int/long long to int16_t/int32_t/int64_t, i found that TLVs got big problems.

    I thing the problem comes from docsis_yy.y and docsis_lex.l . Even i made the above changes into those file, after compile the docsis_yy.c/docsis_lex.c there are variables that uses short/int/long int/long long.

    Personaly i'm out of ideas :( ..

     
  • Richard Laager

    Richard Laager - 2010-06-11

    I'm taking over the abandoned docsis project. I've accepted a patch to fix this in revision 54e1fd206486843ddf508321a0de895a35429bd9 on http://github.com/rlaager/docsis. I hope to cut a 0.9.6 release soon, ideally today. Thanks for the bug report.

     
  • Richard Laager

    Richard Laager - 2010-06-11
    • status: open --> closed-fixed
     

Log in to post a comment.