RegEx++ and Visual Studio .NET STL Problems
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?
Perhaps you should try to use STLPort library. I hope for you it works...since wiki does not send any report on compatibility with Visual 7. good luck. ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
--- In Boost-Users@y..., "john_p_osborn"
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
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
When I upgraded to Visual Studio .NET my programs
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
--- In Boost-Users@y..., "john_p_osborn"
wrote: that use regex++ 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
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@yahoo.com]
Sent: Wednesday, July 03, 2002 3:03 AM
To: Boost-Users@yahoogroups.com
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
When I upgraded to Visual Studio .NET my programs
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
--- In Boost-Users@y..., "john_p_osborn"
wrote: that use regex++ 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@yahoogroups.com Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed]
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@yahoo.com] Sent: Wednesday, July 03, 2002 3:03 AM To: Boost-Users@yahoogroups.com 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
wrote: When I upgraded to Visual Studio .NET my programs
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
--- In Boost-Users@y..., "john_p_osborn"
wrote: that use regex++ 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@yahoogroups.com
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@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
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
I don't know if this is the problem, but I noticed that the problem does indeed involve the 16 byte internal array. When this array is exceeded a memory fault occurs. You don't happen to remember where you read about this, do you? -----Original Message----- 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: 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@yahoo.com] Sent: Wednesday, July 03, 2002 3:03 AM To: Boost-Users@yahoogroups.com 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
wrote: When I upgraded to Visual Studio .NET my programs
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
--- In Boost-Users@y..., "john_p_osborn"
wrote: that use regex++ 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@yahoogroups.com
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@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed]
After a little thinking I remembered, http://www.relisoft.com/forum/toast.asp?sub=show&action=posts&fid=1&tid=567 It's just an error report but I think it explains the problem. Nuno Lucas At 09:27 08-07-2002 -0500, you wrote:
I don't know if this is the problem, but I noticed that the problem does indeed involve the 16 byte internal array. When this array is exceeded a memory fault occurs. You don't happen to remember where you read about this, do you? -----Original Message-----
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
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.
And you should be able to with VC7 - if you are using automatic linking and boost 1.28 just define BOOST_REGEX_STATIC_LINK when building your dll. Otherwise if all else fails just add the regex source directly to your dll project (and define both BOOST_REGEX_NO_LIB and BOOST_REGEX_STATIC_LINK), you may also want to reduce the source files you add to those you actually need to cut out potential code bloat. John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm
participants (7)
-
Alexandre Carsac
-
John Maddock
-
John Osborn
-
john_p_osborn
-
Nir Dremer
-
Nuno Lucas
-
regexpp