История изменений
Исправление mumpster, (текущая версия) :
same shit:
C:>which java
/usr/bin/java C:>which java
/usr/bin/java
C:>java -version
openjdk version «11.0.14» 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-post-Debian-1deb10u1) OpenJDK 64-Bit Server VM (build 11.0.14+9-post-Debian-1deb10u1, mixed mode, sharing)
C:>cat >java-test.c <<EOF
#include <unistd.h>
int main() {
execv(«/usr/bin/java», NULL);
}
…
C:>gcc java-test.c && ./a.out
Segmentation fault
C:>sed -i ‘s/java/python/’ java-test.c
C:>gcc java-test.c && ./a.out
Python 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0] on linux2
Type «help», «copyright», «credits» or «license» for more information.
Исходная версия mumpster, :
same shit:
C:>which java /usr/bin/java C:>which java /usr/bin/java C:>java -version openjdk version «11.0.14» 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-post-Debian-1deb10u1) OpenJDK 64-Bit Server VM (build 11.0.14+9-post-Debian-1deb10u1, mixed mode, sharing) C:>cat >java-test.c <<EOF
#include <unistd.h> int main() { execv(«/usr/bin/java», NULL); } … C:>gcc java-test.c && ./a.out Segmentation fault C:>sed -i ‘s/java/python/’ java-test.c C:>gcc java-test.c && ./a.out Python 2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0] on linux2 Type «help», «copyright», «credits» or «license» for more information.