bugMIT/GNU Scheme - Bugs: bug #34425, Uncaught arithmetic exception with...

 
 

bug #34425: Uncaught arithmetic exception with line-wraps in OS X edwin

Submitter:  None
Submitted:  Wed 28 Sep 2011 10:20:35 PM UTC
   
 
Category:  edwin Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  riastradh Originator Name:  Ian Jacobi
Originator Email:  -email is unavailable- Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 17 Dec 2011 02:34:32 AM UTC, comment #1: 

Fixed in 9.1.

Taylor R. Campbell <riastradh>
Group Member
Wed 28 Sep 2011 10:20:35 PM UTC, original submission:  

I am able to consistently kill mit-scheme in OS X/X11 when using edwin by doing the following:

On a new line in edwin, create a literal tab character (e.g. in Fundamental mode) and then insert several characters.  Then, proceed to insert characters BETWEEN the tab and the last (non-line-feed) character on the line until the cursor would normally line-wrap (i.e. the highlighted character is the character before the '\' line-wrap marker).

Typing any additional character such that the cursor would line-wrap causes the uncaught arithmetic exception (appearing to be a divide-by-zero).

This exception is also raised if the line-feed character at the end of the line is deleted with a backspace (such that the subsequent line would become concatenated to the end of the line-wrapped line).

In gdb, this backtrace reports as follows (in the i386 build):

(gdb) bt
#0  0x00ab94ff in ?? ()
#1  0x000007fe in ?? ()
Cannot access memory at address 0x3ffffff

and my registers are as follows:

(gdb) info registers
eax            0x13c0 5056
ecx            0x13c0 5056
edx            0x0 0
ebx            0x4000 16384
esp            0x80d94 0x80d94
ebp            0x3ffffff 0x3ffffff
esi            0x406ebd0 67562448
edi            0xe129b4 14756276
eip            0xab94ff 0xab94ff
eflags         0x10246 66118
cs             0x1b 27
ss             0x23 35
ds             0x23 35
es             0x23 35
fs             0x0 0
gs             0xf 15

Nearby dissassembled instructions include:

0x00ab94e8: or     $0x1a,%edx
0x00ab94eb: ror    $0x6,%edx
0x00ab94ee: cmp    $0x68000000,%edx
0x00ab94f4: je     0xab9513
0x00ab94f6: mov    %ebx,%eax
0x00ab94f8: mov    %ecx,%eax
0x00ab94fa: mov    %eax,%edx
0x00ab94fc: sar    $0x1f,%edx
0x00ab94ff: idivl  0x600(%esi)
0x00ab9505: shl    $0x6,%eax
0x00ab9508: or     $0x1a,%eax
0x00ab950b: ror    $0x6,%eax
0x00ab950e: mov    %eax,0x8(%esi)
0x00ab9511: jmp    0xab94b9
0x00ab9513: mov    %ecx,%eax
0x00ab9515: mov    %eax,%edx

I am running OS X 10.7 and have observed this bug in the binary build of MIT-Scheme Release 9.0.1 (Microcode 15.1 || Runtime 15.7 || SF 4.41 || LIAR/i386 4.118 || Edwin 3.116) in both the i386 and x86-64 builds (albeit with different register values), and also observed what I believe was this bug in OS X 10.6.

In OS X 10.7, I am using Apple's stock X11: XQuartz 2.6.3 (xorg-server 1.10.2)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #24037:  test added by None (237B - application/octet-stream - An example file which works with an 80-character line-wrap.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by riastradh (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-17 riastradh StatusNone Fixed
        Assigned toNone riastradh
        Open/ClosedOpen Closed
    2011-09-28 None Attached File- Added test, #24037

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code