Steel Bank Common Lisp

BUG: memory fault in MOD (AMD64)

Reported by Nikodemus Siivola on 2011-10-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
High
Unassigned

Bug Description

Eric Marsden <email address hidden> via lists.sourceforge.net to sbcl-devel

Hi,

,----
| * (lisp-implementation-version)
| "1.0.52.37-8b88c20-dirty"
| * (defun foo (a)
| (declare (type (integer -50 50) a))
| (declare (optimize (speed 0)))
| (mod (mod a (min -5 a)) 5))
| FOO
| * (foo 1)
| CORRUPTION WARNING in SBCL pid 7027(tid 140737353942784):
| Memory fault at a (pc=0x20100017, sp=0x7ffff6d67520)
| The integrity of this image is possibly compromised.
| Continuing with fingers crossed.
| debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR:
| Unhandled memory fault at #xA.
`----

Nikodemus Siivola (nikodemus) wrote :

The issue appears to be tied to (< SPEED SPACE) as

     (defun foo (a)
           (declare (type (integer -50 50) a))
           (declare (optimize (speed 1) (space 2)))
           (mod (mod a (min -5 a)) 5))

exhibits the same problem, but (SPEED 0) (SPACE 0) does not.

tags: added: compiler
Anton Kovalenko (anton-sw4me) wrote :

http://github.com/akovalenko/sbcl-win32-threads/commits/5d87a6a6c8 is my earlier attempt to fix it (works for me on x86 and x86-64, at least)

Nikodemus Siivola (nikodemus) wrote :

So I was off-track with SPACE, it seems.

Anton's fix looks mostly good to me.

Changed in sbcl:
status: Confirmed → In Progress
Paul Khuong (pvk) wrote :

I'll commit a complete fix today or tomorrow.

Changed in sbcl:
assignee: nobody → Nikodemus Siivola (nikodemus)
assignee: Nikodemus Siivola (nikodemus) → Paul Khuong (pvk)
Paul Khuong (pvk) on 2011-10-30
Changed in sbcl:
status: In Progress → Fix Committed
Paul Khuong (pvk) wrote :

Fix committed: ec8285d Take inline trampoline into account when optimizing fall-through jumps.

Changed in sbcl:
assignee: Paul Khuong (pvk) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers