HP3000-L Archives

May 1995, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dan Hollis <[log in to unmask]>
Reply To:
Dan Hollis <[log in to unmask]>
Date:
Tue, 23 May 1995 14:43:00 PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (105 lines)
Crashing OCTCOMP'ed SL part III:
 
Ok, spoke with the programmer and I was wrong on one count -- it's Pascal
code, not SPL :)
 
Anyway, here are code snippets for the Procedures in question, as well as a
decompilation of the SL. Maybe someone will see something we haven't. If
someone out there has time maybe it will prove an interesting detective=
 story :)
 
Note: The LnkTrace don't work properly, it appears that when the SL is
OCTCOMP'ed, that the Procedure is passed garbage for parameters. So it
exits, but the stack appears messed up and it crashes deciding to execute
one of the parameters as code.
 
As I said before -- the SL works fine until we OCTCOMP it.
 
-Dan
 
The procedure definitions:
Procedure DoDialModem   (       ControlMode     :   Int16);
{-------------------------------------------------------------------
    Send the Initialization string.
-------------------------------------------------------------------}
Var                             I,J,Err         :   Int16;
                                HoldTimeOut,
                                OldMode         :   Int16;
                                EventBuf,
                                ActivateVISA    :   Str66;
begin
     LnkTrace(Link,tEnter,'DialModem',0,0);
 
Procedure LnkTrace          (   Var Link            :   LinkHandleRec;
                                    Mode            :   Int16;
                                    Str             :   String640;
                                    Status          :   Int16;=7F
                                    CCTL            :   Int16);
{-----------------------------------------------------------------------
    LnkTrace Facility...
-----------------------------------------------------------------------}
Var                                 Buf             :   Str640;
                                    I,t             :   Int16;
begin
    If (Link.Data^.TraceFNum>0) and ValidLink(Link) then begin
 
The stack trace:
16.4507 <=3D=3D=3D Bounds violation!
16.5355
 
The decompilation:
Procedure %51:
 16.5352  043403  G.    LOAD  Q+ 003,I
 16.5353  041604  C.    LOAD  Q- 004
 16.5354  031047  2'    PCAL  %47         =3D 4103 <=3D=3D=3D=3D
 16.5355  140032  ..    BR    P+ 032      =3D 540
 
Procedure %47:
 16.4124  034362  8.    LDPP  %362        =3D 4506
 16.4125  034363  8.    LDPP  %363        =3D 4510
 16.4126  040364  @.    LOAD  P+ 364      =3D 4512
 16.4127  171705  ..    LRA   S- 005
 16.4130  070363  p.    ADDM  P+ 363      =3D 4513
 16.4131  027401  /.    SETR   S
 16.4132  040362  @.    LOAD  P+ 362      =3D 4514
 16.4133  021011  ".    LDI   9
 16.4134  005700  ..    LCMP, NOP
 16.4135  141603  ..    BGE   P+ 003      =3D 4140
 16.4136  040356  @.    LOAD  P+ 356      =3D 4514
 16.4137  054016  X.    TBX   P+ 016      =3D 4155
 16.4140  173411  ..    LRA   Q+ 011,I
 16.4141  021001  ".    LDI   1
 16.4142  171700  ..    LRA   S- 000
 16.4143  100372  ..    SUBM  P+ 372      =3D 4535
 16.4144  000606  ..    ZERO, ZERO
 16.4145  031031  2.    PCAL  LNKTRACE           <=3D=3D=3D=3D
 
DoDialModem:
 16.4465  141603  ..    BGE   P+ 003      =3D 4470
 16.4466  040026  @.    LOAD  P+ 026      =3D 4514
 16.4467  054017  X.    TBX   P+ 017      =3D 4506
 16.4470  173411  ..    LRA   Q+ 011,I
 16.4471  000600  ..    ZERO, NOP
 16.4472  171700  ..    LRA   S- 000
 16.4473  100042  ."    SUBM  P+ 042      =3D 4535
 16.4474  000606  ..    ZERO, ZERO
 16.4475  031031  2.    PCAL  LNKTRACE
 16.4476  035507  ;G    SUBS  %107
 16.4477  173406  ..    LRA   Q+ 006,I
 16.4500  004533  .[    DUP , INCA
 16.4501  010201  ..    LSL   1 BIT
 16.4502  170113  .K    LRA   P+ 113      =3D 4615
 16.4503  010201  ..    LSL   1 BIT
 16.4504  140011  ..    BR    P+ 011      =3D 4515
 16.4505  000027  ..    NOP , DTST
 16.4506  042151  Di    LOAD  P+ 151,I    =3D @@@@@ <=3D=3D=3D=3D Crash=
 ?!?!?!
 16.4507  060554  al    CMPM  P- 154      =3D 4333
 16.4510  046557  Mo    LOAD  P- 157,I,X  =3D @@@@@
 16.4511  062145  de    CMPM  P+ 145,I    =3D @@@@@
 16.4512  066440  m     CMPM  P- 040,I,X  =3D @@@@@
.----------------------------------------------.
|Dan Hollis -- Pharmacy Computer Services, Inc.|
[log in to unmask] - (503)476-3139 ext. 215|
`----------------------------------------------'

ATOM RSS1 RSS2