From: Joseph M. Newcomer on
By the way, I seriously doubt /GS is the cause of your errors. It *might* be the case
that /GS is *detecting* errors that previously existed, in which case the solution is
obvious: fix the bugs!
joe

On Thu, 24 May 2007 08:43:05 +0200, "Thomas Minor" <Thomas.Minor(a)newsgroup.nospam> wrote:

>Hello,
>
>we are migrating a large codebase from vc6 to vc8 while adding Windows Vista
>to
>our supported Platfoms. We experience some strange program terminations with
>the
>new code on the vista platform, while everything runs fine on a XP box.
>
>At the moment, we suspect some compiler setting like /GS to be part of the
>problem,
>but we are open to suggestions.
>
>Bye,
>
>-- Thomas
>
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Tom Serface on
I've not had a problem using this switch in 2005. My guess: some memory got
rearranged somewhere revealing a problem that was already in the code.

Tom

"MrAsm" <mrasm(a)usa.com> wrote in message
news:kina53tt8agf41g39b3sgi75aa97bpulrh(a)4ax.com...
> On Thu, 24 May 2007 08:43:05 +0200, "Thomas Minor"
> <Thomas.Minor(a)newsgroup.nospam> wrote:
>
>>we are migrating a large codebase from vc6 to vc8 while adding Windows
>>Vista
>>to
>>our supported Platfoms. We experience some strange program terminations
>>with
>>the
>>new code on the vista platform, while everything runs fine on a XP box.
>>
>
>>At the moment, we suspect some compiler setting like /GS to be part of the
>>problem,
>>but we are open to suggestions.
>
> Hi,
>
> I believe that /GS switch is a very good friend: it helps you develop
> more robust and secure code.
> Maybe are you having buffer overruns in your code?
> Do you use raw C arrays or raw C strings in your code, or are you
> using the more robust classes like MFC CString or CArray or
> std::string and STL collection classes?
>
> MrAsm

From: Tom Serface on
Joe,

I've seen stranger messages. :o)

Tom

"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
news:692b53hnumr6pc18kg4qft9lglngbgfue1(a)4ax.com...
> OK, so the message box pops up and says "strange program termination",
> right?
>
> Otherwise, presumably there is something actually informative produced.
> What is the exact
> description of what you see?
> joe

From: Joseph M. Newcomer on
So have I, including a MessageBox that contained ONLY the error icon (no text, no
caption). But I suspect that this is NOT what actually happened in this case.
joe
On Thu, 24 May 2007 07:09:17 -0700, "Tom Serface" <tom.nospam(a)camaswood.com> wrote:

>Joe,
>
>I've seen stranger messages. :o)
>
>Tom
>
>"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in message
>news:692b53hnumr6pc18kg4qft9lglngbgfue1(a)4ax.com...
>> OK, so the message box pops up and says "strange program termination",
>> right?
>>
>> Otherwise, presumably there is something actually informative produced.
>> What is the exact
>> description of what you see?
>> joe
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Thomas Minor on
Hi @all,

of caouse you want to see some more information an I think I have some now.

First of all, I'm quite confident that there might be some buffer overruns
and some
resource leaks, but we're on that problem. Nevertheless the software should
not
crash that way. The same binaries run without any crashes on Windows XP SP2.
So that lead me to a Vista related issue. Another issue is, that we are
talking about
a non deterministic error which not reliable reproducable.

Here is the problem signature, we're dealing with an access violation...

Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: Telectrl.exe
Anwendungsversion: 4.3.0.0
Anwendungszeitstempel: 4656c8af
Fehlermodulname: ntdll.dll
Fehlermodulversion: 6.0.6000.16386
Fehlermodulzeitstempel: 4549bdc9
Ausnahmecode: c0000005
Ausnahmeoffset: 0003d5d4
Betriebsystemversion: 6.0.6000.2.0.0.256.6
Gebietsschema-ID: 1031
Zusatzinformation 1: b8f3
Zusatzinformation 2: c7797676e2dfe14e940d5c80c4d40634
Zusatzinformation 3: 0948
Zusatzinformation 4: 68dba24590a88de4f5fa25f4ca0ac49e

And here the stack trace

# ChildEBP RetAddr Args to Child
WARNING: Stack unwind information not available. Following frames may be
wrong.
00 0012ce78 77df18c3 01109820 010face8 00000000
ntdll!RtlTryEnterCriticalSection+0x7a0
01 0012ce8c 77f37a7e 012d0000 00000000 01109818 ntdll!RtlFreeHeap+0x7a
02 0012cea0 700b4c39 012d0000 00000000 01109820 kernel32!HeapFree+0x14
03 0012ceec 6fb06179 01109820 6faf2df9 01109820 MSVCR80!free+0xcd
04 0012cf1c 004103a0 00000000 0012cf60 0040a690 MFC80+0x36179
05 0012cf90 0040a4e9 011079c8 010face8 00000000 Telectrl+0x103a0
06 0012cfa8 0040a6c2 011079c8 010face8 010face8 Telectrl+0xa4e9
07 0012cfc4 6fb02d6c 011079c8 00000000 f2692874 Telectrl+0xa6c2
08 0012d070 6fb027ad 00008116 011079c8 00000000 MFC80+0x32d6c
09 0012d090 6fb01543 00008116 011079c8 00000000 MFC80+0x327ad
0a 0012d0f8 6fb01759 00000000 0025039e 00008116 MFC80+0x31543
0b 0012d11c 6faff883 0025039e 00008116 011079c8 MFC80+0x31759
0c 0012d164 76a01a10 0025039e 00008116 011079c8 MFC80+0x2f883
0d 0012d190 76a01ae8 6faff82f 0025039e 00008116 USER32!GetMessageW+0x6e
0e 0012d208 76a0286a 00316e34 6faff82f 0025039e USER32!GetMessageW+0x146
0f 0012d248 769ed92c 00323dc0 01335250 011079c8
USER32!GetDesktopWindow+0x10a
10 0012d268 00409b40 0025039e 00008116 011079c8 USER32!SendMessageA+0x49
11 0012d284 0040aa26 00008116 011079c8 00000000 Telectrl+0x9b40
12 0012d2dc 6fb02d6c 011079c8 00000001 f269355c Telectrl+0xaa26
13 0012d388 6fb027ad 00008118 011079c8 00000001 MFC80+0x32d6c
14 0012d3a8 6fb01543 00008118 011079c8 00000001 MFC80+0x327ad
15 0012d410 6fb01759 00000000 0025039e 00008118 MFC80+0x31543
16 0012d434 6faff883 0025039e 00008118 011079c8 MFC80+0x31759
17 0012d47c 76a01a10 0025039e 00008118 011079c8 MFC80+0x2f883
18 0012d4a8 76a01ae8 6faff82f 0025039e 00008118 USER32!GetMessageW+0x6e
19 0012d520 76a0286a 00316e34 6faff82f 0025039e USER32!GetMessageW+0x146
1a 0012d560 769ed92c 00323dc0 01335250 011079c8
USER32!GetDesktopWindow+0x10a
1b 0012d580 00409b40 0025039e 00008118 011079c8 USER32!SendMessageA+0x49
1c 0012d59c 0041c0f6 00008118 011079c8 00000001 Telectrl+0x9b40
1d 0012d66c 6fb02d6c 00000002 011079c8 f269312c Telectrl+0x1c0f6
1e 0012d718 6fb027ad 0000c179 00000002 011079c8 MFC80+0x32d6c
1f 0012d738 6fb01543 0000c179 00000002 011079c8 MFC80+0x327ad
20 0012d7a0 6fb01759 00000000 002402c0 0000c179 MFC80+0x31543
21 0012d7c4 6faff883 002402c0 0000c179 00000002 MFC80+0x31759
22 0012d80c 76a01a10 002402c0 0000c179 00000002 MFC80+0x2f883
23 0012d838 76a01ae8 6faff82f 002402c0 0000c179 USER32!GetMessageW+0x6e
24 0012d8b0 76a0286a 00316e34 6faff82f 002402c0 USER32!GetMessageW+0x146
25 0012d8f0 769ed92c 00323cd8 01323c40 00000002
USER32!GetDesktopWindow+0x10a
26 0012d910 00434abe 002402c0 0000c179 00000002 USER32!SendMessageA+0x49
27 0012d94c 0043abe2 011079c8 0012d964 00000018 Telectrl+0x34abe
28 0012da14 0043a360 00000106 0012da38 004aa044 Telectrl+0x3abe2
29 0012fa48 004132bd 00000106 025fdf3c 0032d968 Telectrl+0x3a360
2a 0012fbac 6fb02d6c 00000106 025fdf3c f2691c6c Telectrl+0x132bd
2b 0012fc58 6fb027ad 00000466 00000106 025fdf3c MFC80+0x32d6c
2c 0012fc78 6fb01543 00000466 00000106 025fdf3c MFC80+0x327ad
2d 0012fce0 6fb01759 00000000 002402c0 00000466 MFC80+0x31543
2e 0012fd04 6faff883 002402c0 00000466 00000106 MFC80+0x31759
2f 0012fd4c 76a01a10 002402c0 00000466 00000106 MFC80+0x2f883
30 0012fd78 76a01ae8 6faff82f 002402c0 00000466 USER32!GetMessageW+0x6e
31 0012fdf0 76a01c03 00316e34 6faff82f 002402c0 USER32!GetMessageW+0x146
32 0012fe4c 76a03656 01323cd8 00000466 00000106 USER32!GetMessageW+0x261
33 0012fe74 77df0e6e 0012fe8c 00000018 0012ff90 USER32!OffsetRect+0x4d
34 0012fec8 6fb37cec 00305a10 00000000 00000000
ntdll!KiUserCallbackDispatcher+0x2e
35 00000000 00000000 00000000 00000000 00000000 MFC80+0x67cec