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\n");
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\n");
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.
Reply to: