delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
X-Authentication-Warning: | hp2.xraylith.wisc.edu: khan owned process doing -bs |
Date: | Tue, 9 May 2000 13:08:37 -0500 (CDT) |
From: | Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU> |
To: | Marat Boshernitsan <maratb AT CS DOT Berkeley DOT EDU> |
cc: | cygwin AT sourceware DOT cygnus DOT com, bug-gnu-utils AT gnu DOT org, |
abegel AT CS DOT Berkeley DOT EDU | |
Subject: | Re: g++/linker bug on cygwin1.1.0 (win32) |
In-Reply-To: | <tfvr9bcjjz6.fsf@sequoia.cs.berkeley.edu> |
Message-ID: | <Pine.HPP.3.96.1000509130250.8029E-100000@hp2.xraylith.wisc.edu> |
MIME-Version: | 1.0 |
On 8 May 2000, Marat Boshernitsan wrote: > > Hello, > > I've hit upon an obscure g++/linker bug on Cygwin1.1.0 which causes the > resulting executable to have "call 0x0" instructions in a few places > instead of proper calls. The attached testcase (together with the > Makefile) demonstrates the problem: just do make and run one of the > resulting "bug*" executables to get a runtime error. > > Few points of interest: > > - the test case is fairly obscure, but it is distilled from a much > larger system. > > - if the return type of the argument type of "void* __stdcall > I_RpcAllocate(unsigned int);" declaration in dlltest.cc are modified in > any way the problem goes away. (This declaration is not random: I > actually pulled it out of one of the cygwin header files -- rpcdcep.h -- > after several hours of chasing this down). It's caused by a misfeature/bug in the C++ parser. The following declarations can cause bizarre behaviour in your code (and *very* hard to track down as you've found out): void * __stdcall foo (); whereas the following works fine: void __stdcall * foo (); __stdcall void * foo (); Cygwin 1.1.0 has the workarounds for this bug in the system headers (ole.h, rpcdcep.h and winsock.h). This has been one of the weirdest bug to track since it causes bad code, and as soon as you change the order of includes or object files, it magically goes away! See the following for a testcase that shows the problem: Linkname: (C++) parser bug in handling fn attributes URL: http://gcc.gnu.org/ml/gcc-bugs/1999-11n/msg00084.html Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |