This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Leakage from initialization of pair<..., string>


Martin Sebor wrote:
> Wu Yongwei wrote:

>> Maybe you are willing to try this?

> I get the following output with gcc 3.4 on Solaris, both with
> our implementation as well as with libstdc++. I'm pretty sure
> we don't have a leak in our code (the same source produces the
> expected output when compiled with EDG eccp), so I suspect the
> compiler or libsupc++.
[...]

Concur with refinement.  g++ 3.4.1, as installed, displays this bug on
i386-unknown-freebsd4.9 (three "operator new is called" lines).  With
gcc "3.5", I see the the expected outcome.  If I rework the example to
move all uint_str_t creation to main function scope, then I see the
expected outcome.  Switching to white box study: The difference in
libsupc++ src "3.4.1" and "3.5" is ~29 lines related to 64-bit guards.

Thus, if you file a PR, please set it against 3.4.1 and g++.  Since it
is already fixed on mainline (please note that fact), I don't know if
anyone will consider this worth fixing.

Wu, thank you for the report.

Regards,
Loren


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]