Pay No Attention to the Errors Behind the Curtain

Following are messages one does not want to see when reviewing the error logs from an applications:

Maximum buffer size exceeded

Uhh… maybe it’s just a really tiny buffer size?

One thought on “Pay No Attention to the Errors Behind the Curtain

  1. just pixels says:

    I now use the following formula when allocating buffers:

    maximum expected size * 2 + 4 terabytes.

    I added the part about 4 terabytes based on sad experience. In C++, buffer errors (boundary errors) don’t just say “buffer exceeded”. Instead, they produce randomly strange behavior elsewhere in the application. In MS C++, running under the debugger alters the behavior — sometimes preventing the error from occurring. DOH!

    (OK, I know good programming practice says to check boundaries, but no one can follow all those crazy programming rules.)

Leave a Reply

Your email address will not be published. Required fields are marked *