Thread overview
wx 2.4.2 - and the winner header is...
Feb 18, 2004
Sammy
Feb 18, 2004
Arjan Knepper
Feb 19, 2004
Walter
Feb 19, 2004
Arjan Knepper
Feb 19, 2004
Walter
February 18, 2004
string.h

done more testing...

done a fresh - clean install of 8.39
installed the beta 8.40 over 8.39

once again, no samples execute

begun to add, one by one, the 20
headers of 8.37 who has been updated in 8.39 distro

once added the header stay there.
each time, do a full rebuild of the wx libs,
then compile and example.

*surprise*

all the samples compiled with the libs built with the 8.37 string.h header execute ok. the other crashes with a stack overflow.

Just to be sure, i made a last test.
i re-installed everything, yes, once more, fresh & clean.

copied only one header from the 8.37 distro - string.h
and tested some samples.

they were ok

So the cause sits, either in string.h, or in corresponding source file in the dmc runtime, or both.

...


February 18, 2004
Sammy wrote:
> string.h
> 
> done more testing...
> 
> done a fresh - clean install of 8.39
> installed the beta 8.40 over 8.39
> 
> once again, no samples execute
> 
> begun to add, one by one, the 20
> headers of 8.37 who has been updated in 8.39 distro
> 
> once added the header stay there.
> each time, do a full rebuild of the wx libs,
> then compile and example.
> 
> *surprise*
> 
> all the samples compiled with the libs built with the 8.37 string.h
> header execute ok. the other crashes with a stack overflow.
> 
> Just to be sure, i made a last test.
> i re-installed everything, yes, once more, fresh & clean.
> 
> copied only one header from the 8.37 distro - string.h
> and tested some samples.
> 
> they were ok
> 
> So the cause sits, either in string.h, or in corresponding
> source file in the dmc runtime, or both.
> 
> ...
> 
> 

strpbrk or _tcspbrk is the cause of trouble...

from the debugger:

strpbrk:
PUSH EBP
MOV EBP, ESP
PUSH [strpbrk::s2 (EBP+0000000C)]
PUSH [strpbrk::s1 (EBP+00000008)]
CALL strbprk

Arjan
February 19, 2004
Is it possible that swprintf is being used? swprintf's args were modified to be standard compatible.

"Arjan Knepper" <arjan@ask.me> wrote in message news:c10649$2ek9$1@digitaldaemon.com...
> Sammy wrote:
> > string.h
> >
> > done more testing...
> >
> > done a fresh - clean install of 8.39
> > installed the beta 8.40 over 8.39
> >
> > once again, no samples execute
> >
> > begun to add, one by one, the 20
> > headers of 8.37 who has been updated in 8.39 distro
> >
> > once added the header stay there.
> > each time, do a full rebuild of the wx libs,
> > then compile and example.
> >
> > *surprise*
> >
> > all the samples compiled with the libs built with the 8.37 string.h header execute ok. the other crashes with a stack overflow.
> >
> > Just to be sure, i made a last test.
> > i re-installed everything, yes, once more, fresh & clean.
> >
> > copied only one header from the 8.37 distro - string.h
> > and tested some samples.
> >
> > they were ok
> >
> > So the cause sits, either in string.h, or in corresponding source file in the dmc runtime, or both.
> >
> > ...
> >
> >
>
> strpbrk or _tcspbrk is the cause of trouble...
>
> from the debugger:
>
> strpbrk:
> PUSH EBP
> MOV EBP, ESP
> PUSH [strpbrk::s2 (EBP+0000000C)]
> PUSH [strpbrk::s1 (EBP+00000008)]
> CALL strbprk
>
> Arjan


February 19, 2004
Arjan Knepper wrote:
> Sammy wrote:
> 
>> string.h
>>
>> done more testing...
>>
>> done a fresh - clean install of 8.39
>> installed the beta 8.40 over 8.39
>>
>> once again, no samples execute
>>
>> begun to add, one by one, the 20
>> headers of 8.37 who has been updated in 8.39 distro
>>
>> once added the header stay there.
>> each time, do a full rebuild of the wx libs,
>> then compile and example.
>>
>> *surprise*
>>
>> all the samples compiled with the libs built with the 8.37 string.h
>> header execute ok. the other crashes with a stack overflow.
>>
>> Just to be sure, i made a last test.
>> i re-installed everything, yes, once more, fresh & clean.
>>
>> copied only one header from the 8.37 distro - string.h
>> and tested some samples.
>>
>> they were ok
>>
>> So the cause sits, either in string.h, or in corresponding
>> source file in the dmc runtime, or both.
>>
>> ...
>>
>>
> 
> strpbrk or _tcspbrk is the cause of trouble...
> 
> from the debugger:
> 
> strpbrk:
> PUSH EBP
> MOV EBP, ESP
> PUSH [strpbrk::s2 (EBP+0000000C)]
> PUSH [strpbrk::s1 (EBP+00000008)]
> CALL strbprk
> 
> Arjan

To solve this change line 314 in string.h from:
//inline const char *strpbrk(const char *s1,const char *s2) { return (char *) strpbrk((const char *)s1,s2); }

to:
inline const char *strpbrk(const char *s1,const char *s2) { return (char *) strpbrk((char *)s1,s2); }

Arjan
February 19, 2004
Thanks, Arjan. That'll go out in the next beta.