Crash on omkdepend
Daniel Laugt via omniORB-list <[email protected]> Thu, 20 May 2021 16:43:22 +0000
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <PH0PR14MB43896584B3967223AD94023BEC2A9@PH0PR14MB4389.namprd14.prod.outlook.com> |
Hi, The binary omkdepend.exe crashes when it is compiled with visual studio in 64 bits. The compilation gives the following warning: pr.c(105) : warning C4047: 'initializing' : 'char *' differs in levels of indirection from 'int' It's because the function TranslateFileNameD2U() is not declared. So, visual studio considers that this function is returning an int (instead of char*). The size of a pointer is 64 bits and the size of an int is 32 bits. At runtime, it gives a crash because it converts the pointer to an int and convert back to a pointer. The following patch resolves the crash: src/tool/omkdepend/pr.c: /* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */ /* Copyright (c) 1993, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. */ +#ifdef __WIN32__ +#include "gnuwin32.h" +#endif #include "def.h" Regards, Daniel. _______________________________________________ omniORB-list mailing list [email protected] https://www.omniorb-support.com/mailman/listinfo/omniorb-list