Skip to content

Commit

Permalink
lang/mono5*: unbreak with kern.elf*.allow_wx=0
Browse files Browse the repository at this point in the history
$ mono foo
Segmentation fault

* thread #1, name = 'mono-sgen', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000000005632f9 mono`mono_arch_create_sdb_trampoline(single_step=0, info=0x0000000820fe7d90, aot=0) at tramp-amd64.c:854:2
   851          // IP saved at CFA - 8
   852          mono_add_unwind_op_offset (unwind_ops, code, buf, AMD64_RIP, -cfa_offset);
   853
-> 854          amd64_push_reg (code, AMD64_RBP);
   855          cfa_offset += sizeof(mgreg_t);
   856          mono_add_unwind_op_def_cfa_offset (unwind_ops, code, buf, cfa_offset);
   857          mono_add_unwind_op_offset (unwind_ops, code, buf, AMD64_RBP, - cfa_offset);
(lldb) bt
* thread #1, name = 'mono-sgen', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00000000005632f9 mono`mono_arch_create_sdb_trampoline(single_step=0, info=0x0000000820fe7d90, aot=0) at tramp-amd64.c:854:2
    frame #1: 0x000000000047cf36 mono`mini_get_breakpoint_trampoline at mini-trampolines.c:1812:12
    frame #2: 0x00000000004dc5a1 mono`mono_arch_init at mini-amd64.c:1405:19
    frame #3: 0x000000000035fde4 mono`mini_init(filename="foo", runtime_version=0x0000000000000000) at mini-runtime.c:4364:2
    frame #4: 0x0000000000426853 mono`mono_main(argc=2, argv=0x0000000820fe8268) at driver.c:2470:11
    frame #5: 0x0000000000359363 mono`mono_main_with_options(argc=2, argv=0x0000000820fe8268) at main.c:50:9
    frame #6: 0x00000000003589b1 mono`main(argc=2, argv=0x0000000820fe8268) at main.c:406:9
    frame #7: 0x0000000000358770 mono`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
  • Loading branch information
jbeich committed Aug 10, 2023
1 parent e89f841 commit 174de78
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lang/mono/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mono
PORTVERSION= 5.10.1.57
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= lang
MASTER_SITES= https://download.mono-project.com/sources/mono/
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
Expand Down Expand Up @@ -37,13 +37,14 @@ NLS_USES= gettext

X11_USES= display:test

USES= autoreconf bison compiler:c11 cpe gmake iconv libtool \
USES= autoreconf bison compiler:c11 cpe elfctl gmake iconv libtool \
pathfix perl5 python shebangfix tar:bzip2
USE_PERL5= build
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
SHEBANG_FILES= scripts/mono-heapviz mono/mini/genmdesc.py mono/tests/test_lldb.py
BINARY_ALIAS= python=${PYTHON_CMD}
ELF_FEATURES= +wxneeded:mono/mini/mono-sgen

CONFIGURE_ARGS= --disable-dtrace
CONFIGURE_ENV= ac_cv_header_sys_inotify_h=no
Expand Down
5 changes: 3 additions & 2 deletions lang/mono5.10/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mono
PORTVERSION= 5.10.1.57
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= lang
MASTER_SITES= https://download.mono-project.com/sources/mono/
PKGNAMESUFFIX= 5.10
Expand Down Expand Up @@ -41,13 +41,14 @@ NLS_USES= gettext

X11_USES= display:test

USES= autoreconf bison compiler:c11 cpe gmake iconv libtool \
USES= autoreconf bison compiler:c11 cpe elfctl gmake iconv libtool \
pathfix perl5 python shebangfix tar:bzip2
USE_PERL5= build
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
SHEBANG_FILES= scripts/mono-heapviz mono/mini/genmdesc.py mono/tests/test_lldb.py
BINARY_ALIAS= python=${PYTHON_CMD}
ELF_FEATURES= +wxneeded:mono/mini/mono-sgen

CONFIGURE_ARGS= --disable-dtrace
CONFIGURE_ENV= ac_cv_header_sys_inotify_h=no
Expand Down
5 changes: 3 additions & 2 deletions lang/mono5.20/Makefile
@@ -1,6 +1,6 @@
PORTNAME= mono
PORTVERSION= 5.20.1.34
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= https://download.mono-project.com/sources/mono/
PKGNAMESUFFIX= 5.20
Expand Down Expand Up @@ -40,14 +40,15 @@ NLS_USES= gettext

X11_USES= display:test

USES= autoreconf bison compiler:c11 cpe gmake iconv libtool \
USES= autoreconf bison compiler:c11 cpe elfctl gmake iconv libtool \
pathfix perl5 python shebangfix tar:bzip2
USE_PERL5= build
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
SHEBANG_FILES= scripts/mono-heapviz scripts/mono-package-runtime \
mono/mini/genmdesc.py mono/tests/test_lldb.py
BINARY_ALIAS= python=${PYTHON_CMD}
ELF_FEATURES= +wxneeded:mono/mini/mono-sgen

CONFIGURE_ARGS= --disable-dtrace --enable-btls
CPPFLAGS+= -I${LOCALBASE}/include
Expand Down

0 comments on commit 174de78

Please sign in to comment.