FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 11-17-2007, 08:52 PM
Pierre Habouzit
 
Default 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
 

Thread Tools




All times are GMT. The time now is 02:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org