[ace-users] Access violation if handling a structure containing
an octet sequence length > 2604 bytes
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Fri Aug 17 10:11:09 CDT 2007
Hi Arne,
Thanks very much for usin gthe PRF.
> ACE VERSION:
> 5.5.4
I recommend you do two things:
1. Please upgrade to ACE+TAO+CIAO x.5.10 (i.e., ACE 5.5.10, TAO 1.5.10, and
CIAO 0.5.10), which you can download from
http://download.dre.vanderbilt.edu
under the heading: "Latest Beta Kit".
2. If the problem still persists use a memory corruption tool like
Purify to BoundsChecker to see if there's a memory corruption going
on somewhere.
The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html
Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out
http://www.dre.vanderbilt.edu/support.html
for a list of companies that will provide you with ACE+TAO commercial
support.
Thanks,
Doug
> HOST MACHINE and OPERATING SYSTEM:
> Intel(R) Core(TM)2 and Windows XP Prof. V2002 SP2
>
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> Borland Developer Studio for Microsoft=C2=AE Windows=E2=84=A2 Versi=
>on
>10.0.2288.42451 Update 2
>
> THE $ACE_ROOT/ace/config.h FILE
> config-win32.h
>
> AREA/CLASS/EXAMPLE AFFECTED:
> TAO::template <typename stream>
> bool demarshal_sequence(stream & strm,
>TAO::unbounded_value_sequence <CORBA::Short> & target)
> and
> TAO::details::template<typename T, bool dummy>
> struct unbounded_value_allocation_traits::freebuf(value_type
>*)
>
> DOES THE PROBLEM AFFECT:
> COMPILATION: no
> LINKING: no
> EXECUTION: yes
> OTHER: no
>
> SYNOPSIS:
> Access violation if handling a structure containing an octet
>sequence length > 2604 bytes
>
> DESCRIPTION:
> I've implemented a server interface contains a method with a
> structured "in" parameter. The structure consists of several
>sequences
> (key-value-pairs like string-long, string-double, string-
>binary data and so on).
> The entries of the binary data sequences is defined as
> struct SimBinary
> {
> string key; // identifier
> sequence<octet> value; // the binary data
> };
> typedef sequence<SimBinary> SimBinarySeq;
> If any of these octet sequences contains more than 2604 bytes
>an
> access violation occurs in
> TAO::details::template<typename T, bool dummy>
> struct
>unbounded_value_allocation_traits::freebuf(value_type *buffer)
> {
> delete [] buffer; // access violation
> }
> Within template
> TAO::template <typename stream>
> bool demarshal_sequence(stream & strm,
>TAO::unbounded_value_sequence <CORBA::Short> & target)
> {
> ...
> sequence tmp(new_length);
> ...
> }
> a temporary instance "tmp" is created. At the end of function
>block the destructor
> ~unbounded_value_sequence<CORBA::Octet>();
> is called and invokes
> freebuf(buffer);
>
> Until length of 2604 bytes no problems occur. Is there a limit
>I've to look after?
> Nevertheless an access violation should not occur!
>
> REPEAT BY:
> See description. After first exception thread is died.
>
> SAMPLE FIX/WORKAROUND:
> I will produce an example if necessary. A workaround is not
>possible.
>
>Thanks if anyone can promp help me.
>
>Best regards
>Arne Berger
>
--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.schmidt at vanderbilt.edu
More information about the Ace-users
mailing list