|
From: Julian S. <js...@ac...> - 2005-04-24 18:18:18
|
> > Add intercepts for operator new(unsigned long) and operator
> > new[](unsigned long). The 32-bit ones take unsigned int args, not
> > unsigned longs, and so the existing name-set did not capture them.
>
> The parameters are actually std::size_t, which should be 32-bits on 32-bit
> platforms and 64-bits on 64-bit platforms, so I'm confused by this
> change...
Problem is this. If you compile this
int* p1 = new int;
int* p2 = new int[10];
on x86, the resulting assembly/object contains calls to _Znwj and _Znaj
respectively. But on amd64, those calls are to _Znwm and _Znam
instead. If you offer up those 4 symbols to c++filt, it says they are
operator new(unsigned int) (..j variants)
operator new[](unsigned int)
operator new(unsigned long) (..m variants)
operator new[](unsigned long)
from which I assume that the C++ name mangler dereferences all type
aliases -- which size_t must be -- before generating the mangled name.
Hence you end up with different names on the differently-word-sized
platforms.
J
|