[ https://issues.apache.org/jira/browse/XERCESC-2179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16966730#comment-16966730 ]
martin goodall edited comment on XERCESC-2179 at 11/4/19 3:10 PM: ------------------------------------------------------------------ sorry but this is pretty basic and the code is wrong. which bit do you disagree with below which is exactly as specified in the win32transponder code? unsigned int var = 0; // this is 32 bits on a 64 bit platform being set to 0 func(LPDWORD *ptr); // function prototype defined as/expects 64 bits as LPDWORD is a "far/long dword which is 64 bits" ... func((LPDWORD *) &var); // call to function ... void func(LPDWORD *ptr) { *ptr = 0; // seg - overwrites 64 bits but only 32 bits available } hope this helps see the bug. ps - this is compiled with VisualStudio 2019 was (Author: martgoodall): sorry but this is pretty basic and the code is wrong. which bit do you disagree with below which is exactly as specified in the win32transponder code? int short var = 0; // this is 32 bits on a 64 bit platform being set to 0 func(LPDWORD *ptr); // function prototype defined as/expects 64 bits as LPDWORD is a "far/long dword which is 64 bits" ... func((LPDWORD *) &var); // call to function ... void func(LPDWORD *ptr) { *ptr = 0; // seg - overwrites 64 bits but only 32 bits available } hope this helps see the bug. ps - this is compiled with VisualStudio 2019 > access violation in win32transservice.cpp with 64 bit compile > ------------------------------------------------------------- > > Key: XERCESC-2179 > URL: https://issues.apache.org/jira/browse/XERCESC-2179 > Project: Xerces-C++ > Issue Type: Bug > Components: DOM > Affects Versions: 3.2.2 > Reporter: martin goodall > Assignee: Alberto Massari > Priority: Blocker > Fix For: 3.2.3 > > Attachments: Win32TransService.cpp > > > calls to ::Reg... to get registry info are passing in stack variables that > are 8 bytes long into functions that overwrite 16 bytes, causing memory > overwrite and very random segs. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org