AREXX ADDRESS Command crashes Linux Hosted AROS

NathanH · 731

NathanH

  • Newbie
  • *
    • Posts: 17
    • Karma: +1/-0
on: April 27, 2023, 02:13:42 PM
Hi,

The following used to work fine (around 13 years ago was last I tried this command) but now it crashes AROS.  I read here that it is a problem on 68k AROS too.  The following AREXX program should list the current directory.

Add the following to a file called test.rexx:
--------------------------------------------------------------------
/* a bug in AREXX */

OPTIONS RESULTS

ADDRESS command 'List'

Exit
-------------------------------------------------------------------

Then from a shell type: rx test.rexx

AROS then crashes.  Please add to the fix list.  Thanks.

NathanH



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #1 on: April 28, 2023, 03:09:54 AM
Please try this version and let me know if it fixes the problem for you:

https://axrt.org/development/regina.library.i386.zip



NathanH

  • Newbie
  • *
    • Posts: 17
    • Karma: +1/-0
Reply #2 on: April 28, 2023, 10:07:54 AM
Amazing, that totally fixes the problem.  Thanks very much Deadwood!

NathanH



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #3 on: April 28, 2023, 10:40:25 AM
Glad it worked :)



Mazze

  • Junior Member
  • **
    • Posts: 88
    • Karma: +36/-0
Reply #4 on: April 28, 2023, 01:41:40 PM
@deadw00d: ABIv1 still crashes. Would you please tell what you changed?



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #5 on: April 29, 2023, 12:32:21 AM
@Mazze

Here is the commit: https://github.com/deadw00d/contrib/commit/8e3540ae350bd86c84f79d2ef2bc87b12c69ba98

Though it most likely is not suitable for ABIv1 as is - my branch has some changes with handling "libraries that require C library but the the program is not opening it" (like in this case). The cause of crash in my case was that regina wanted to strlen (I think) but per task StdCBase was not set.



Mazze

  • Junior Member
  • **
    • Posts: 88
    • Karma: +36/-0
Reply #6 on: April 29, 2023, 01:24:49 AM
Here's where it crashes in ABIv1:

#0  0x0000000041636e2c in __strlen_StdCBase_relwrapper () at /home/mazze/projects/fullaros/aros-linux-x86_64-dbg/bin/linux-x86_64/gen/compiler/stdc/stdc/linklib/stdc_strlen_relstub.c:29
#1  0x000000005f528b48 in CallEntry (argptr=0x0, argsize=0, entry=0x4162bbda <StartCommand>, me=0x41810e30) at /home/mazze/projects/fullaros/aros-src/rom/dos/./exit.c:127



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #7 on: April 29, 2023, 01:29:44 AM
Yes, its the same place.

If you 'disassemble' frame 0 and do 'p $eax' you should see that it does not contain a valid StdCBase. Applying my patch will 'solve' that problem, but I don't know if it won't created other problems. In my master branch I completely removed 'pertaskbase' libraries and changed how C libraries work. Eventually ABIv0 will also 'inherit' this change the the patch I shared won't be needed. I don't know what's the proper solution for ABIv1 though.