ports/152304: sysutils/fcron: illegal instruction 4
Chris Calvey
chris at geonumerical.org
Thu Dec 9 16:10:16 UTC 2010
The following reply was made to PR ports/152304; it has been noted by GNATS.
From: Chris Calvey <chris at geonumerical.org>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/152304: sysutils/fcron: illegal instruction 4
Date: Thu, 9 Dec 2010 15:39:16 +0000
I have found the cause of this bug. When subs.c is compiled the
following warning message is generated:
subs.c: In function 'open_as_user':
subs.c:124: warning: 'mode_t' is promoted to 'int' when passed through
'...'
subs.c:124: warning: (so you should pass 'int' not 'mode_t' to 'va_arg')
subs.c:124: note: if this code is reached, the program will abort
gcc generates a ud2a instruction in the resulting subs.o object file and
the program indeed aborts when it hits this instruction.
This is a temporary patch that resolves this problem:
--- subs.c.orig 2010-12-09 14:41:13.000000000 +0000
+++ subs.c 2010-12-09 14:41:46.000000000 +0000
@@ -121,7 +121,7 @@
if (flags & O_CREAT) {
va_start(ap, flags);
- mode = va_arg(ap, mode_t);
+ mode = va_arg(ap, int);
va_end(ap);
}
@@ -179,7 +179,7 @@
if (flags & O_CREAT) {
va_start(ap, flags);
- mode = va_arg(ap, mode_t);
+ mode = va_arg(ap, int);
va_end(ap);
}
I have reported the above to the fcron developer in addition.
Regards
Chris
More information about the freebsd-ports-bugs
mailing list