Hi all. We are developing and application over uclibc and busybox on a 
mips architecture.

In addition, we are using an Erlang Virtual Machine. The problem is that 
this one fails when we try to access to system. Example:

4> os:cmd("ls /").
[]

5> open_port({spawn, "ls"}, []).
#Port<0.91>
6> flush().
ok

As we see, the above commands doesn't list anything.

We think underlaying Virtual Machine uses "exec" family calls and these 
ones crash. In fact, we have made some tests with little programs. We 
compile the same source code to x86 and mips and then, we saw different 
behaviors.

The above results have led us to anticipate that glibc is robuster than 
uclibc and supports some warnings. In such a case we can think that 
Erlang VM. Have anybody an idea about this?

Thanks,
Andrés Estévez


int main(){
int result = execv("/bin/ls", NULL);
exit(0);
}//main

mips: Segmentation fault
x86: OK

*************************************************************************************

int main(){

int result = execv("/bin/ls", "-lisa");

exit(0);
}//main

warning
proba_exec5.c:13: warning: passing argument 2 of ‘execv’ from 
incompatible pointer type

mips: error 14, Bad address
x86: error 14, Bad address

*************************************************************************************
int main(){
int result = execv("/bin/ls", "");

exit(0);
}//main

warning
proba_exec9.c:13: warning: passing argument 2 of ‘execv’ from 
incompatible pointer type

mips: Segmentation fault
x86: Error, error 14, Bad address

***************************************************************************************

int main(){

char *cmd[] = { "ls", "-l", (char *)0 };
int result = execv("/bin/ls", cmd);
exit(0);
}//main

mips: Ok
x86: Ok

**************************************************************************************

int main(){

char *cmd[] = { "ls", "", (char *)0 };

int result = execv("/bin/ls", cmd);
exit(0);
}//main


mips: No such file or directory
x86: no such file or directory

****************************************************************************************

int main(){

char *cmd[] = { "ls", NULL, (char *)0 };

int result = execv("/bin/ls", cmd);

exit(0);
}//main

mips: Ok
x86: Ok

_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to