From owner-freebsd-questions Fri Oct 1 14:12: 3 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail001.mediacity.com (mail001.mediacity.com [205.216.172.9]) by hub.freebsd.org (Postfix) with SMTP id 01BD814BCD for ; Fri, 1 Oct 1999 14:11:48 -0700 (PDT) (envelope-from spock@techfour.net) Received: (qmail 18304 invoked from network); 1 Oct 1999 21:11:48 -0000 Received: from cm-208-138-197-238.fredericksburg.mg.ispchannel.com (HELO enterprise.muriel.penguinpowered.com) (208.138.197.238) by mail001.mediacity.com with SMTP; 1 Oct 1999 21:11:48 -0000 Content-Length: 1671 Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 X-SENDERNAME: `Mike Heffner` Date: Fri, 01 Oct 1999 17:13:06 -0400 (EDT) From: Mike Heffner To: freebsd-questions@freebsd.org Subject: program breaks with stable->current upgrade Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG hi, i have just recently upgraded to current from stable, and a program which i use doesn't work anymore. the program dies with a signal 8, floating point exception during runtime. after investigating, i found that the problem is that it uses nested calls to __builtin_apply(). (a builtin function in gcc, allows the calling of other functions with a variable number of args). the program worked fine under -stable, but no longer works under -current. i don't think this is a result of not being compatible with current, but rather something that just got accidently broken between the two distributions. is there any way to fix this problem? Thanks, --------------------------------- Mike Heffner Fredericksburg, VA ICQ# 882073 Date: 01-Oct-99 Time: 16:59:22 --------------------------------- this is a short program which demonstrates the problem. when a function returns that has been called with __builtin_apply() from within another function called with __builtin_apply(), it will die/core dump with a SIGFPE. /* example.c - spock@techfour.net */ #include int fb(int); int fc(int); int fa (int a){ printf("(fa) blah = %d\n", a); a++; __builtin_apply((void *)fb, __builtin_apply_args(), 32); return 1; } int fb (int b){ printf("(fb) blah = %d\n", b); b++; __builtin_apply((void *)fc, __builtin_apply_args(), 32); return 1; } int fc(int c){ printf("(fc) blah = %d\n", c); return 1; /* program will crash immediately after returning from this * function */ } main(){ int blah=1; fa(blah); } /* end example.c */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message