[Mono-bugs] [Bug 49499][Cri] Changed - mono:: segfaults under Fedora Linux

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 20 Oct 2003 14:03:15 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tds00mahi@thn.htu.se.

http://bugzilla.ximian.com/show_bug.cgi?id=49499

--- shadow/49499	2003-10-20 13:00:08.000000000 -0400
+++ shadow/49499.tmp.29654	2003-10-20 14:03:14.000000000 -0400
@@ -351,6 +351,43 @@
 $2 = (MonoClass *) 0x74c08510
 (gdb) print method->klass->name
 Cannot access memory at address 0x74c08538
 (gdb) print method->klass->name_space
 Cannot access memory at address 0x74c0853c
 
+
+------- Additional Comments From tds00mahi@thn.htu.se  2003-10-20 14:03 -------
+One thing to note about the linker flag variant, is that mono works in
+exec-shield levels 0, 1 and 3(!) only. With the mprotect thing it does
+2 as well. These are the levels;
+
+ exec-shield=0 - always-disabled
+ exec-shield=1 - default disabled, except binaries that enable it
+ exec-shield=2 - default enabled, except binaries that disable it
+ exec-shield=3 - always-enabled
+
+
+Using the linker flag fix:
+
+[root@/home/malte/test-execstack-ldflags/bin]# echo 0 >
+/proc/sys/kernel/exec-shield
+[root@/home/malte/test-execstack-ldflags/bin]# ./mono mcs.exe
+error CS2008: No files to compile were specified
+Compilation failed: 1 error(s), 0 warnings
+
+[root@/home/malte/test-execstack-ldflags/bin]# echo 1 >
+/proc/sys/kernel/exec-shield
+[root@/home/malte/test-execstack-ldflags/bin]# ./mono mcs.exe
+error CS2008: No files to compile were specified
+Compilation failed: 1 error(s), 0 warnings
+
+[root@/home/malte/test-execstack-ldflags/bin]# echo 2 >
+/proc/sys/kernel/exec-shield
+[root@/home/malte/test-execstack-ldflags/bin]# ./mono mcs.exe
+Segmentation fault
+
+[root@/home/malte/test-execstack-ldflags/bin]# echo 3 >
+/proc/sys/kernel/exec-shield
+[root@/home/malte/test-execstack-ldflags/bin]# ./mono mcs.exe
+error CS2008: No files to compile were specified
+Compilation failed: 1 error(s), 0 warnings
+