Boost logo

Boost Users :

From: Nuno Lucas (nuno.lucas_at_[hidden])
Date: 2002-07-04 17:04:10


I had read in some place that the string implementation of .NET uses an
internal array of 16 chars when the string is small enough and grows only
when that isn't enough. This can cause problems for strings created on the
stack and passed to external procedures.
Can this be the case ? (I don't have .NET so I don't know if this is true).

  Nuno Lucas

At 11:07 03-07-2002 -0500, you wrote:
>I'm checking my code for memory overwrites, but I'm fairly certain that's
>not the cause (at least on my part). I 'm thinking that it is a code
>generation problem as John Maddock described.
>
>I am calling regex++ from a COM inproc server dll. It won't link if I try
>to link to the static boost library because various STL calls are already
>defined. If I use the boost dll then I get the heap problem as already
>described.
>
>With MSVC++ version 6 I am able to link to the static boost library with no
>problem.
> -----Original Message-----
> From: Nir Dremer [mailto:nir_dremer_at_[hidden]]
> Sent: Wednesday, July 03, 2002 3:03 AM
> To: Boost-Users_at_[hidden]
> Subject: Re: [Boost-Users] Re: RegEx++ and Visual Studio .NET STL Problems
>
>
> This problem is bad heap allocation.
> if anywhere in your program you create something using
> the new operand and afterward access some ilegal
> position (beyond the end of the allocation) - vc7
> compiler will detect that and will popup an assert.
>
> regex++ is working excellent with vc7 so you can
> assume it's something in the code you wrote that
> corrupts the heap.
>
> Good idea would be to refer to _CrtCheckMemory() API
> and to debug you allocations code.
>
>
> Cheers,
> Nir
>
> --- regexpp <john_maddock_at_[hidden]> wrote:
> > --- In Boost-Users_at_y..., "john_p_osborn"
> > <john_p_osborn_at_y...> wrote:
> > > When I upgraded to Visual Studio .NET my programs
> > that use regex++
> > > stopped working. Many simple calls fail during
> > string destruction
> > > with bad heap pointers. I never had any problems
> > under msvc
> > version
> > > 6. Has anyone else experienced this? Is a
> > problem with the new MS
> > > STL?
> >
> > Nope, but make doubly sure that you are using a
> > shared memory
> > allocator, and if your project uses dll's that all
> > the dll's are
> > built with the same code generation options (ie the
> > dll runtime).
> >
> > Hope this helps,
> >
> > John Maddock
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> Yahoo! Groups Sponsor
>
>
> Info: <http://www.boost.org>
> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
> Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
>
>[Non-text portions of this message have been removed]
>
>
>Info: <http://www.boost.org>
>Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
>Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


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