You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Travis Vitek (JIRA)" <ji...@apache.org> on 2007/10/11 00:37:50 UTC
[jira] Created: (STDCXX-584) purify reports memory leak from
__rw_vfmtwhat in 18.exception test
purify reports memory leak from __rw_vfmtwhat in 18.exception test
------------------------------------------------------------------
Key: STDCXX-584
URL: https://issues.apache.org/jira/browse/STDCXX-584
Project: C++ Standard Library
Issue Type: Improvement
Components: Tests
Reporter: Travis Vitek
Assignee: Travis Vitek
Priority: Trivial
Fix For: 4.2.1
The library uses a system of functions for platforms that don't support exceptions. The __rw_throw function calls __rw_vfmtwhat() to get a string describing the exception that has occured. Under some conditions the string is allocated from the heap as an array of characters. Eventually __rw_throw invokes a function via pointer (__rw_throw_proc) that is supposed to process the exception (possibly by throwing a real exception object). Unfortunately the test does not deallocate the string that was allocated by __rw_vfmtwhat().
Purify: Searching for all memory leaks...
Memory leaked: 3072 bytes (25.6%); potentially leaked: 0 bytes (0%)
wLK: 3072 bytes leaked in 12 blocks
* This memory was allocated from:
malloc [rtlib.o]
operator new(unsigned) [libstd15d.so]
operator new [](unsigned) [libstd15d.so]
__rw::__rw_vfmtwhat(char*, unsigned, char const*, char*) [exception.cpp:479]
__rw::__rw_throw(int, ...) [exception.cpp:825]
test_rw_throw() [18.exception.cpp:527]
* Block of 256 bytes (12 times); last block at 0x8118de0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (STDCXX-584) purify reports memory leak from
__rw_vfmtwhat in 18.exception test
Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537315 ]
Farid Zaripov commented on STDCXX-584:
--------------------------------------
Commited thus: http://svn.apache.org/viewvc?rev=587886&view=rev
> purify reports memory leak from __rw_vfmtwhat in 18.exception test
> ------------------------------------------------------------------
>
> Key: STDCXX-584
> URL: https://issues.apache.org/jira/browse/STDCXX-584
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Priority: Trivial
> Fix For: 4.2.1
>
> Attachments: stdcxx-584.patch
>
>
> The library uses a system of functions for platforms that don't support exceptions. The __rw_throw function calls __rw_vfmtwhat() to get a string describing the exception that has occured. Under some conditions the string is allocated from the heap as an array of characters. Eventually __rw_throw invokes a function via pointer (__rw_throw_proc) that is supposed to process the exception (possibly by throwing a real exception object). Unfortunately the test does not deallocate the string that was allocated by __rw_vfmtwhat().
> Purify: Searching for all memory leaks...
> Memory leaked: 3072 bytes (25.6%); potentially leaked: 0 bytes (0%)
> wLK: 3072 bytes leaked in 12 blocks
> * This memory was allocated from:
> malloc [rtlib.o]
> operator new(unsigned) [libstd15d.so]
> operator new [](unsigned) [libstd15d.so]
> __rw::__rw_vfmtwhat(char*, unsigned, char const*, char*) [exception.cpp:479]
> __rw::__rw_throw(int, ...) [exception.cpp:825]
> test_rw_throw() [18.exception.cpp:527]
> * Block of 256 bytes (12 times); last block at 0x8118de0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (STDCXX-584) purify reports memory leak from
__rw_vfmtwhat in 18.exception test
Posted by "Travis Vitek (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Travis Vitek updated STDCXX-584:
--------------------------------
Attachment: stdcxx-584.patch
Just in case it isn't clear, the test sets the function that is invoked when the library wants to throw an exception. The function that the test sets doesn't properly deallocate the exception string. There is a comment in there that indicates that the string is not supposed to be deallocated, but I think that comment is out of date wrt the code as it is now.
2007-10-10 Travis Vitek <vi...@roguewave.com>
STDCXX-584
* 18.exception.cpp (test_throw_proc): Deallocate exception
description string passed to user throw proc to avoid memory
leak.
> purify reports memory leak from __rw_vfmtwhat in 18.exception test
> ------------------------------------------------------------------
>
> Key: STDCXX-584
> URL: https://issues.apache.org/jira/browse/STDCXX-584
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Priority: Trivial
> Fix For: 4.2.1
>
> Attachments: stdcxx-584.patch
>
>
> The library uses a system of functions for platforms that don't support exceptions. The __rw_throw function calls __rw_vfmtwhat() to get a string describing the exception that has occured. Under some conditions the string is allocated from the heap as an array of characters. Eventually __rw_throw invokes a function via pointer (__rw_throw_proc) that is supposed to process the exception (possibly by throwing a real exception object). Unfortunately the test does not deallocate the string that was allocated by __rw_vfmtwhat().
> Purify: Searching for all memory leaks...
> Memory leaked: 3072 bytes (25.6%); potentially leaked: 0 bytes (0%)
> wLK: 3072 bytes leaked in 12 blocks
> * This memory was allocated from:
> malloc [rtlib.o]
> operator new(unsigned) [libstd15d.so]
> operator new [](unsigned) [libstd15d.so]
> __rw::__rw_vfmtwhat(char*, unsigned, char const*, char*) [exception.cpp:479]
> __rw::__rw_throw(int, ...) [exception.cpp:825]
> test_rw_throw() [18.exception.cpp:527]
> * Block of 256 bytes (12 times); last block at 0x8118de0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (STDCXX-584) purify reports memory leak from
__rw_vfmtwhat in 18.exception test
Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farid Zaripov resolved STDCXX-584.
----------------------------------
Resolution: Fixed
> purify reports memory leak from __rw_vfmtwhat in 18.exception test
> ------------------------------------------------------------------
>
> Key: STDCXX-584
> URL: https://issues.apache.org/jira/browse/STDCXX-584
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2.0
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Priority: Trivial
> Fix For: 4.2.1
>
> Attachments: stdcxx-584.patch
>
>
> The library uses a system of functions for platforms that don't support exceptions. The __rw_throw function calls __rw_vfmtwhat() to get a string describing the exception that has occured. Under some conditions the string is allocated from the heap as an array of characters. Eventually __rw_throw invokes a function via pointer (__rw_throw_proc) that is supposed to process the exception (possibly by throwing a real exception object). Unfortunately the test does not deallocate the string that was allocated by __rw_vfmtwhat().
> Purify: Searching for all memory leaks...
> Memory leaked: 3072 bytes (25.6%); potentially leaked: 0 bytes (0%)
> wLK: 3072 bytes leaked in 12 blocks
> * This memory was allocated from:
> malloc [rtlib.o]
> operator new(unsigned) [libstd15d.so]
> operator new [](unsigned) [libstd15d.so]
> __rw::__rw_vfmtwhat(char*, unsigned, char const*, char*) [exception.cpp:479]
> __rw::__rw_throw(int, ...) [exception.cpp:825]
> test_rw_throw() [18.exception.cpp:527]
> * Block of 256 bytes (12 times); last block at 0x8118de0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (STDCXX-584) purify reports memory leak from
__rw_vfmtwhat in 18.exception test
Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farid Zaripov closed STDCXX-584.
--------------------------------
> purify reports memory leak from __rw_vfmtwhat in 18.exception test
> ------------------------------------------------------------------
>
> Key: STDCXX-584
> URL: https://issues.apache.org/jira/browse/STDCXX-584
> Project: C++ Standard Library
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 4.2.0
> Reporter: Travis Vitek
> Assignee: Travis Vitek
> Priority: Trivial
> Fix For: 4.2.1
>
> Attachments: stdcxx-584.patch
>
>
> The library uses a system of functions for platforms that don't support exceptions. The __rw_throw function calls __rw_vfmtwhat() to get a string describing the exception that has occured. Under some conditions the string is allocated from the heap as an array of characters. Eventually __rw_throw invokes a function via pointer (__rw_throw_proc) that is supposed to process the exception (possibly by throwing a real exception object). Unfortunately the test does not deallocate the string that was allocated by __rw_vfmtwhat().
> Purify: Searching for all memory leaks...
> Memory leaked: 3072 bytes (25.6%); potentially leaked: 0 bytes (0%)
> wLK: 3072 bytes leaked in 12 blocks
> * This memory was allocated from:
> malloc [rtlib.o]
> operator new(unsigned) [libstd15d.so]
> operator new [](unsigned) [libstd15d.so]
> __rw::__rw_vfmtwhat(char*, unsigned, char const*, char*) [exception.cpp:479]
> __rw::__rw_throw(int, ...) [exception.cpp:825]
> test_rw_throw() [18.exception.cpp:527]
> * Block of 256 bytes (12 times); last block at 0x8118de0
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.