dbremner / mili

Automatically exported from code.google.com/p/mili
Boost Software License 1.0
0 stars 0 forks source link

binary streams debug support #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please add tests to ensure that debug support (BSTREAMS_DEBUG define) of binary 
streams (bstreams) works correctly.
There might be missing cases where corruption detection fails.

pls reassign.

Original issue reported on code.google.com by danielgutson@gmail.com on 31 Dec 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Side note: this is very important, specially for FUD.
We should be able to solve the 32/64b issue (issue#?) just using this feature, 
but it currently does not detect it.

Original comment by danielgutson@gmail.com on 31 Dec 2011 at 11:31

GoogleCodeExporter commented 9 years ago
Additional comment: assert() should be replaced by an exception, which is also 
needed for unit testing.

Original comment by danielgutson@gmail.com on 31 Dec 2011 at 11:33

GoogleCodeExporter commented 9 years ago

Original comment by hugo.arregui on 31 Dec 2011 at 5:16

GoogleCodeExporter commented 9 years ago
Extra info: when serializing/deserealizing an integer, the library should also 
encode the length of the integer (4bytes, 8 bytes).
This will help to find the FUD bug when mixing systems of 32 and 64 bits.

Original comment by daniel.g...@fudepan.org.ar on 31 Dec 2011 at 5:34

GoogleCodeExporter commented 9 years ago
Implementation note:
  you might want to create some template class helper that describes the type:

#ifdef BSTREAMS_DEBUG
template <class T>
struct TypeDescriber
{
    static const char* describe()
    {
        return typeid(T).name();
    }
};

// here the specifics: int, string, etc.
template <> 
struct TypeDescriber<int>
{
    static const char* describe()
    {
        // return a string of typeid(int) plus size
    }
};

// ...
#endif

Original comment by daniel.g...@fudepan.org.ar on 31 Dec 2011 at 5:42

GoogleCodeExporter commented 9 years ago

Original comment by lukas.vs...@gmail.com on 3 Jan 2012 at 6:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r325.

Original comment by lukas.vs...@gmail.com on 20 Jan 2012 at 8:37

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r328.

Original comment by lukas.vs...@gmail.com on 22 Jan 2012 at 1:48