Boost logo

Boost :

From: Mountfort, Geoff (gmountfort_at_[hidden])
Date: 2001-12-06 18:28:10


Thanks.

Geoff

-----Original Message-----
From: Jason Shirk [mailto:jasonsh_at_[hidden]]
Sent: Friday, 7 December 2001 10:18 AM
To: boost_at_[hidden]
Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex

A PCH is really a core dump with some header information. When using
the PCH (the /Yu option), the compiler simply calls MapViewOfFileEx
mapping in the PCH at the address the heap was created at.

This works great on NT because each process has its own address space.
As long as the process (cl.exe in this case) carefully manages its own
memory, it can ensure the memory region needed for the PCH is always
available.

On Win9x, the address space is shared between processes, so a process
can't control the address space required for the PCH heap. So, when the
compiler fails to load the PCH at the address it was dumped out at, we
load the heap at a new address, and then adjust all pointers in the heap
by the offset between old and new addresses.

It actually reminds me very much of the generic object [un]serialization
problem.

The idea is simple, but it's very hard code to maintain and test. To
test, almost every construct the compiler can parse must occur when the
PCH is created, then that construct must somehow be referenced when the
PCH is used and has been relocated.

This should also explain the need for the /Zm option. The compiler
needs to ensure it has a contiguous address space for the heap we create
the PCH from. The /Zm option is the poor man's way of helping ensure
that. We do have a few improvements we can make to alleviate the need
for the /Zm option in most cases, but nobody really complains, so it
will probably wait.
 
Jason Shirk
VC++ Compiler Team

-----Original Message-----
From: Mountfort, Geoff [mailto:gmountfort_at_[hidden]]
Sent: Thursday, December 06, 2001 2:49 PM
To: 'boost_at_[hidden]'
Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex

I'm interested.

Geoff

-----Original Message-----
From: Jason Shirk [mailto:jasonsh_at_[hidden]]
Sent: Friday, 7 December 2001 9:32 AM
To: boost_at_[hidden]
Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex

PCH's don't always work well on Win9x based machines due in part to our
design and to a lesser degree the emphasis placed on testing (both
internally and by actual customer use.)

PCH's are very reliable on WinNT and beyond.

There are solid technical reasons for this. If anyone is interested,
I'm more than happy to explain.

VC7 won't install on Win9x machines, so in theory this problem will
quietly go away once people upgrade.

Jason Shirk
VC++ Compiler Team

-----Original Message-----
From: Paul A. Bristow [mailto:boost_at_[hidden]]
Sent: Thursday, December 06, 2001 2:08 PM
To: boost_at_[hidden]
Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex

When I was using a Win98 machine, with 'default' IDE settings,
for a plain console application.
I used to get this problem (before I even knew pre-compiled headers
existed!).
Haven't tried recompiling on a W2k machine I now use.

I tried increasing a stack size (as a MS document recommended for
internal
compile faults)
as I remember, but it didn't help.

Incidentally I don't find 'edit and continue' works reliably either.

Rebuild each time did work.

Thanks

Paul

> -----Original Message-----
> From: Jason Shirk [mailto:jasonsh_at_[hidden]]
> Sent: Thursday, December 06, 2001 5:41 PM
> To: boost_at_[hidden]
> Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex
>
>
> Are you hitting this problem on a Win9x/WinME machine or a
> WinNT/Win2K/WinXP machine?
>
> Are you using -YX or -Yc/-Yu?
>
> If it's a Win9x only problem, then I think I know what is wrong.
>
> -----Original Message-----
> From: Paul A. Bristow [mailto:boost_at_[hidden]]
> Sent: Thursday, December 06, 2001 7:23 AM
> To: boost_at_[hidden]
> Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex
>
> I agree with this advice - I have found if you have complex code it
may
> be
> necessary
> to do this for EVERY re-compile.
>
> Paul
>
> Dr Paul A Bristow, hetp Chromatography
> Prizet Farmhouse
> Kendal, Cumbria
> LA8 8AB UK
> +44 1539 561830
> Mobile +44 7714 33 02 04
> mailto:pbristow_at_[hidden]
>
>
> > -----Original Message-----
> > From: Mountfort, Geoff [mailto:gmountfort_at_[hidden]]
> > Sent: Thursday, December 06, 2001 12:00 AM
> > To: 'boost_at_[hidden]'
> > Subject: RE: [boost] MS VC 6 Internal Compiler Error using regex
> >
> >
> > When confronted with an unexpected MSVC error message I have found
> Build >
> > Batch Build... > Rebuild All often works miracles.
> >
> >
> > Geoff (VC 6.0 SP 3)
> >
> > -----Original Message-----
> > From: the_dilster [mailto:dylan_at_[hidden]]
> > Sent: Thursday, 6 December 2001 10:48 AM
> > To: boost_at_[hidden]
> > Subject: [boost] MS VC 6 Internal Compiler Error using regex
> >
> >
> > std::string pattern;
> > std::string line;
> > ...
> > boost::regex expr(pattern);
> > boost::smatch what;
> > boost::regex_match(line, what, expr);
> >
> > e:\boost_1_25_0\boost\regex\detail\regex_match.hpp(1053) : fatal
> > error C1001: ININTERNAL COMPILER ERROR
> >
> > VC 6.0 SP 5
> >
> > Compiling in debug mode, no optimisations.
> >
> > Tried using cmatch, line.c_str(), same thing.
> > Put in
> > #define BOOST_NO_MEMBER_TEMPLATES
> > before
> > #include "boost/regex.hpp"
> >
> > and it worked, then took it out again and it worked again!
> > Deleting the obj file seems to work too...very strange.
> >
> > Dylan
> >
> >
> > Info: http://www.boost.org Send unsubscribe requests to:
> > <mailto:boost-unsubscribe_at_[hidden]>
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
> > Info: http://www.boost.org Send unsubscribe requests to:
> > <mailto:boost-unsubscribe_at_[hidden]>
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
>

Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/

Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk