|
Boost Users : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-25 02:11:40
Merrill Cornish wrote:
> Below is a small program that demonstrates some of the problems I've
> been having. It takes one positional parameter, "limit" which is of type
> size_t. I'm linking statically with debug symbols.
>
> With the "try" in the position shown, after the declaration of vm, this is
> what happens to me for different command line arguments:
>
> * --limit=4 => works and prints limit=4
>
> * --limt=4 => [notice misspelling] throws "unknown option limt" exception;
> but also triggers Dr. Watson: Application Error - The instruction at
> "0x0042eb49" referenced memory at "0x010900fb". The memory
> could not be "written".
>
> * --limit=-4 => [note negative value] never exits store(). Gets Dr.
> Watson "The instruction at "0x0049c090" referenced memory at
> "0x00eab651". The memory could not be "written.
>
> * --limit=xxx => [note string value] never exits store(). Get Dr. Watson
> with same message as above.
I'm afraid I can't reproduce any of this, using CVS HEAD. Running under
valgrind does not report any error either. Also, you did not provide enough
information for me to track this down:
1. What's the exact version you're trying? Is that 1.32, 1.33, 1.33.1, CVS
HEAD, or what?
2. Is the above message from Dr. Watson the all you've got. I can't make
anything from numeric addresses. Does it print the offending source line?
Does it print the stack trace (including source lines)? If no, did you try
running under real debugger and getting stack trace? Or looking which line
precisely accesses wrong memory?
> Now, move the "try" to immediately after main() so all of the program
> options code is included in the try block.
>
> * --limit=4 => works as before
>
> * --limt=4 => [notice misspelling] Does NOT throw expected "unknown
> option" exception, never exits store(), but does trigger Dr. Watson,
> this time trying to read location 0xd.
>
> * --limit=-4 => similar error to above, with slightly different addresses.
>
> * --limt=xxx => similar error to above with slightly different addresses.
I can't reproduce this either, sorry.
- Volodya
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net