You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2644 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Mike Zuhl
Version: 3.07
OS: Linux SLES 8/AMD64, SP3
Submission from: fw.pdx.polyserve.com (216.64.170.67)
In porting some ocaml code from i386 to amd64, I ran across a couple of bugs
that
cause wild memory accesses. I traced it back to the conversion of ocaml
runtime
from i386, where the exception and young pointers live in memory, to the amd64
where they spend most of their time in registers. Here's the fix:
Original bug ID: 2644
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Mike Zuhl
Version: 3.07
OS: Linux SLES 8/AMD64, SP3
Submission from: fw.pdx.polyserve.com (216.64.170.67)
In porting some ocaml code from i386 to amd64, I ran across a couple of bugs
--- amd64.S.ORIG 2004-04-26 15:30:16.000000000 -0700 +++ amd64.S 2004-05-05 17:30:20.000000000 -0700 @@ -34,11 +34,11 @@ movq %rax, caml_last_return_address(%rip) leaq 8(%rsp), %rax movq %rax, caml_bottom_of_stack(%rip) +.L105: /* Save young_ptr, caml_exception_pointer */ movq %r15, young_ptr(%rip) movq %r14, caml_exception_pointer(%rip) /* Build array of registers, save it into caml_gc_regs */ -.L105: pushq %r13 pushq %r12 pushq %rbp @@ -184,6 +184,7 @@ call *%rax /* Reload alloc ptr */ movq young_ptr(%rip), %r15 + movq caml_exception_pointer(%rip), %r14 /* Return to caller */ pushq %r12 ret @@ -252,7 +253,9 @@ FUNCTION(raise_caml_exception) movq %rdi, %rax movq caml_exception_pointer(%rip), %rsp - popq caml_exception_pointer(%rip) + /*popq caml_exception_pointer(%rip)*/ + popq %r14 + movq %r14, caml_exception_pointer(%rip) retthat
cause wild memory accesses. I traced it back to the conversion of ocaml
runtime
from i386, where the exception and young pointers live in memory, to the amd64
where they spend most of their time in registers. Here's the fix:
/* Callback from C to Caml */
The text was updated successfully, but these errors were encountered: