Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian GCC (http://www.linux-archive.org/debian-gcc/)
-   -   Bug#451707: gdc-4.1: gdc is confused by variadic arguments in (C) mode (http://www.linux-archive.org/debian-gcc/133-bug-451707-gdc-4-1-gdc-confused-variadic-arguments-c-mode.html)

Pierre Habouzit 11-17-2007 08:52 PM

Bug#451707: gdc-4.1: gdc is confused by variadic arguments in (C) mode
 
Package: gdc-4.1
Version: 0.25-4.1.2-17
Severity: grave
Justification: renders package unusable

The following code triggers the issue:

--------------------------------------------------
import std.c.process;
int main(char args[][]) {
execl("/bin/sh", "sh", "-c", "ls", null);
printf("%m
");
return -1;
}
--------------------------------------------------

It seems to be related to the fact that execl prototype is:

extern(C) int exelc(char *, char *, ...) because if I do that:

--------------------------------------------------
extern(C) int execl(char *path, char *arg, char*, char*, char*, ...);
int main(char args[][]) {
execl("/bin/sh", "sh", "-c", "ls", null);
printf("%m
");
return -1;
}
--------------------------------------------------

The code works. Moreover, the execl in the first case fails with a `Bad
Address` error (probably EFAULT).

This is really nasty and makes the use of many POSIX functions totally
impossible.



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 12:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.