<div dir="ltr">Hi all,<div><br></div><div>Win32AttachOperationRequest is created via new, but doesn't specify a custom new inside the class definition. The result seems to be that we use global new on Windows:</div><div><br></div><div>  for (int i=0; i<max_enqueued_operations; i++) {<br>    Win32AttachOperationRequest* op = new Win32AttachOperationRequest();<br>      f1:    b9 28 0d 00 00               mov    ecx,0xd28<br>      f6:        e8 00 00 00 00               call   fb <Win32AttachListener::init()+0x7b><br>                   f7: IMAGE_REL_AMD64_REL32       operator new(unsigned long long)</div><div><br></div><div>Stepping away from gcc's objdump and using the Microsoft dumpbin alongside cl.exe instead, the result is this:</div><div><br></div><div>  0000000000000264: B9 28 0D 00 00     mov         ecx,0D28h<br>  0000000000000269: E8 00 00 00 00     call        ??2@YAPEAX_K@Z<br>  000000000000026E: 48 89 44 24 28     mov         qword ptr [rsp+28h],rax<br>  0000000000000273: 48 83 7C 24 28 00  cmp         qword ptr [rsp+28h],0<br>  0000000000000279: 74 11              je          000000000000028C<br>  000000000000027B: 48 8B 4C 24 28     mov         rcx,qword ptr [rsp+28h]<br>  0000000000000280: E8 00 00 00 00     call        ??0Win32AttachOperationRequest@@QEAA@XZ</div><div><br></div><div>undname "??2@YAPEAX_K@Z"<br>Microsoft (R) C++ Name Undecorator<br>Copyright (C) Microsoft Corporation. All rights reserved.<br><br>Undecoration of :- "??2@YAPEAX_K@Z"<br>is :- "void * __ptr64 __cdecl operator new(unsigned __int64)"</div><div><br></div><div>undname "??0Win32AttachOperationRequest@@QEAA@XZ"<br>Microsoft (R) C++ Name Undecorator<br>Copyright (C) Microsoft Corporation. All rights reserved.<br><br>Undecoration of :- "??0Win32AttachOperationRequest@@QEAA@XZ"<br>is :- "public: __cdecl Win32AttachOperationRequest::Win32AttachOperationRequest(void) __ptr64"</div><div><br></div><div>Visual Studio, lacking the nm utility, obviously doesn't catch this. What was more surprising is that the gcc Link Time check also fails to catch it as well. I had to manually check the output of nm after an unrelated failure and happened to stumble across the symbols _Znwy and _ZdlPvy which both correspond to</div><div><br></div><div>operator new(unsigned long long)</div><div>operator delete(void*, unsigned long long)</div><div><br></div><div>The delete can be ignored, it's the result of a bug on my experimental branch (It was first discovered there, then I tested it on master). I'm more interested about the new, since it seems to be violating a HotSpot rule. Is this an intentional exception to the rule, or an oversight?</div><div><br></div><div>best regards,</div><div>Julian</div></div>