stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-817) [HP aCC 6.16] C++ runtime leaks memory
Date Mon, 31 Mar 2008 22:56:24 GMT
[HP aCC 6.16] C++ runtime leaks memory
--------------------------------------

                 Key: STDCXX-817
                 URL: https://issues.apache.org/jira/browse/STDCXX-817
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
            Reporter: Martin Sebor


The HP aCC 6.16 runtime on HP-UX/IPF leaks 16 bytes of memory:
{noformat}
$ cat x.cpp && aCC -AA -V x.cpp && ./a.out 
#include <stdio.h>
#include <stdlib.h>
#include <new>

namespace std { }
using namespace std;

void* operator new (size_t n) throw (bad_alloc) {
    void* const ptr = malloc (n);
    fprintf (stderr, "operator new (%zu) ==> %p\n", n, ptr);
    return ptr;
}

void operator delete (void *ptr) throw () {
    fprintf (stderr, "operator delete (%p)\n", ptr);
    free (ptr);
}

void* operator new[] (size_t n) throw (bad_alloc) {
    void* const ptr = malloc (n);
    fprintf (stderr, "operator new[] (%zu) ==> %p\n", n, ptr);
    return ptr;
}

void operator delete[] (void *ptr) throw () {
    fprintf (stderr, "operator delete[] (%p)\n", ptr);
    free (ptr);
}

int main () {
    fprintf (stderr, "main\n");
}
aCC: HP C/aC++ B3910B A.06.16 [Nov 26 2007]
ld: 92453-07 linker ld HP Itanium(R) B.12.41  IPF/IPF
operator new (16) ==> 40012460
main
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message