[jamming] Standard way to nullify actions?

Abbate, Joseph M Joseph.Abbate at ca.com
Tue Nov 16 08:21:43 PST 2004


Hi Diane,

You wrote ...

> Change
> 
> actions Link1
> 
> to
> 
> actions Link
> 

I tried your suggestion since it seemed reasonable enough, but it
managed to crash Jam ...

%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual
address=000000003FFFFFE0, PC=0000000000037864, PS=0000001B

  Improperly handled condition, image exit forced.
    Signal arguments:   Number = 0000000000000005
                        Name   = 000000000000000C
                                 0000000000000004
                                 000000003FFFFFE0
                                 0000000000037864
                                 000000000000001B

    Register dump:
    R0  = 0000000000000000  R1  = 0000002E3D53013C  R2  =
0000000000010D60
    R3  = 0000000000000000  R4  = 0000000040000120  R5  =
0000000040000A68
    R6  = 0000000000281708  R7  = 0000000040000128  R8  =
0000000000000000
    R9  = 0000000000000000  R10 = 00000000000E8EB0  R11 =
000000007FFCE3E0
    R12 = 0000000000060000  R13 = 0000000000012FC0  R14 =
0000000000000000
    R15 = 000000007AEF58C0  R16 = 0000000040000120  R17 =
0000000040000120
    R18 = 0000000000000000  R19 = 0000000000000000  R20 =
0000000000000000
    R21 = 0070000000000000  R22 = 0000000000000054  R23 =
0000000000000000
    R24 = 000000003D000000  R25 = 0000000000000001  R26 =
00000000000353F4
    R27 = 00000000000112F8  R28 = 0000000040000120  R29 =
FFFFFFFF855DFD08
    SP  = 000000007AE08000  PC  = 0000000000037864  PS  =
000000000000001B

If I read the debugger correctly, the PC corresponds to the newstr()
function in newstr.c. There seems to be some recursive memory allocation
problem in there.

If I go back and rename Link to Link1, Jam works fine.

For the record, I'm using Jam 2.5 on OpenVMS 7.3 and here are the rule
and actions blocks:

if $(VMS)
{
    rule Link
    {
        local o ;

        # Delete the options file -- this doesn't work
        Clean clean : $(<:S=.opt) ;

        if $(>[1])
        {
            Link1 $(<) : $(>[1]) ;
            for o in $(>[2-])
            {
                Link2 $(<) : $(o) ;
            }
            LinkFinal $(<) ;
        }
        else
        {
            LinkOriginal $(<) : $(>) ;
        }
        MODE on $(<) = $(EXEMODE) ;
        Chmod $(<) ;
    }
}
...
if $(VMS)
{
    actions quietly Link1
    {
        open /write optsfile $(<:S=.opt)
        write optsfile "$(>) -"
        close optsfile
    }
    actions quietly Link2
    {
        open /append optsfile $(<:S=.opt)
        write optsfile ", $(>) -"
        close optsfile
    }
    actions LinkFinal bind NEEDLIBS
    {
        open /append optsfile $(<:S=.opt)
        write optsfile " "
        close optsfile
        $(LINK) /exe=$(<) $(LINKFLAGS) $(<:S=.opt)/opt
        if $severity .ne. 1 then $(RM) $(<);*
    }
    actions LinkOriginal bind NEEDLIBS
    {
        $(LINK)/exe=$(<) $(LINKFLAGS) $(>:J=,) ,$(NEEDLIBS)/lib
,$(LINKLIBS)
    }
}

Note that the crash occurs when I replace the "Link1" in both the rule
and the actions blocks.

I have found a more recent post (Aug 12, 2004) from Robert with a
slightly modified version of his rule and actions, but he pointed out he
had not tested it recently. However, Johan Nilsson appeared to have
worked out a solution to linker options files on VMS, so I'll try
contacting him.

Joe Abbate
Senior Software Engineer
Computer Associates
joseph.abbate at ca.com




More information about the jamming mailing list