CTSRD-CHERI / cheribsd-ports

FreeBSD ports tree adapted for CheriBSD.
https://CheriBSD.org
Other
5 stars 11 forks source link

Purecap Morello Perl crashes when running git-add--interactive #50

Open nwf-msr opened 2 years ago

nwf-msr commented 2 years ago

Running git checkout -p dies with SIGPROT. Asking the system to elaborate with

gdb --args /usr/local/bin/perl /usr/local/libexec/git-core/git-add--interactive --patch=checkout --

gives

Program received signal SIGPROT, CHERI protection violation
Capability tag fault.
Perl_SvREFCNT_dec (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], sv=0x4106d570 [rwRW,0x4106d000-0x4106dff0])
    at ./inline.h:231
231     ./inline.h: No such file or directory.
(gdb) bt
#0  Perl_SvREFCNT_dec (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0],
    sv=0x4106d570 [rwRW,0x4106d000-0x4106dff0]) at ./inline.h:231
#1  Perl_sv_clear (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], orig_sv=<optimized out>) at sv.c:6739
#2  0x0000000040588b48 in Perl_sv_free2 (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0],
    sv=0x4106e3f0 [rwRW,0x4106e000-0x4106eff0], rc=0) at sv.c:7132
#3  0x00000000405b0f14 in Perl_SvREFCNT_dec_NN (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0],
    sv=0x4106d570 [rwRW,0x4106d000-0x4106dff0]) at ./inline.h:249
#4  Perl_free_tmps (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0]) at scope.c:218
#5  0x0000000040571a28 in Perl_pp_nextstate (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0]) at pp_hot.c:53
#6  0x0000000040571920 in Perl_runops_standard (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0]) at run.c:41
#7  0x00000000404e28e8 in Perl_call_sv (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], sv=<optimized out>,
    flags=13) at perl.c:3076
#8  0x00000000404df268 in Perl_call_list (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], oldscope=2,
    paramList=0x40ffaa50 [rwRW,0x40ffa000-0x40ffaff0]) at perl.c:5115
#9  0x00000000404ce180 in S_process_special_blocks (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], floor=45,
    fullname=<optimized out>, gv=0x40ffaa80 [rwRW,0x40ffa000-0x40ffaff0],
    cv=0x40ffa7b0 [rwRW,0x40ffa000-0x40ffaff0]) at op.c:11751
#10 0x00000000404c6718 in Perl_newATTRSUB_x (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0],
    floor=<optimized out>, o=<optimized out>, proto=<optimized out>, attrs=<optimized out>,
    block=0x40f56a50 [rwRW,0x40f56800-0x40f57000], o_is_gv=<optimized out>) at op.c:11677
#11 0x00000000404c7360 in Perl_utilize (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], aver=<optimized out>,
    floor=45, version=<optimized out>, idop=<optimized out>, arg=<optimized out>) at op.c:8839
#12 0x000000004050d5fc in Perl_yyparse (my_perl=<optimized out>, gramtype=<optimized out>) at perly.y:347
#13 0x00000000404e1448 in S_parse_body (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], env=<optimized out>,
    xsinit=<optimized out>) at perl.c:2561
#14 perl_parse (my_perl=0x40f33000 [rwRW,0x40f33000-0x40f34bf0], xsinit=<optimized out>, argc=<optimized out>,
    argv=<optimized out>, env=<optimized out>) at perl.c:1872
#15 0x00000000001111c8 in main (argc=0, argv=0xfffffff7eb50 [rwRW,0xfffffff7eb50-0xfffffff7eb60],
    env=<optimized out>) at perlmain.c:126

pkg64c info says that this is with perl5-5.32.1_1 and git-2.36.0.