On 01 July 2005 08:18, Donald Bruce Stewart wrote:

> simonmar:
>> Looking back through the mail archives, these errors started
>> occurring on 11 March: 
>> 
>>   http://www.haskell.org//pipermail/cvs-ghc/2005-March/023893.html
>> 
>> And the most likely breaking commit is this one:
>> 
>>   http://www.haskell.org//pipermail/cvs-ghc/2005-March/023883.html
>> 
>> What's strange is that this commit has been merged into STABLE, but
>> you're not seeing any breakage on STABLE.
> 
> Looks like it was the change pushing the obscure_ccall code into
> inline assembly. Reverting this for  OpenBSD only (so its allocated
> RWX once at startup) fixes the problems. This also explains why stable
> didn't break -- the inline asm change isn't in stable.
> I'll do some more testing, though.

The asm version is a bit dodgy.  It might be safer to put the inline asm
inside a function definition - could you try the patch below?

Cheers,
        Simon

*** Adjustor.c.~1.45.~  Thu Apr  7 12:17:39 2005
--- Adjustor.c  Fri Jul  1 09:08:12 2005
***************
*** 122,143 ****
    returning in some static piece of memory and arrange
    to return to it before tail jumping from the adjustor thunk.
  */
! __asm__ (
!    ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
!    UNDERSCORE "obscure_ccall_ret_code:\n\t"
!    "addl $0x4, %esp\n\t"
!    "ret"
!   );
  extern void obscure_ccall_ret_code(void);
  #endif
  
  #if defined(x86_64_HOST_ARCH)
! __asm__ (
     ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
     UNDERSCORE "obscure_ccall_ret_code:\n\t"
     "addq $0x8, %rsp\n\t"
     "ret"
    );
  extern void obscure_ccall_ret_code(void);
  #endif
  
--- 122,149 ----
    returning in some static piece of memory and arrange
    to return to it before tail jumping from the adjustor thunk.
  */
! static void  GNUC3_ATTRIBUTE(used) obscure_ccall_wrapper(void)
! {
!   __asm__ (
!      ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
!      UNDERSCORE "obscure_ccall_ret_code:\n\t"
!      "addl $0x4, %esp\n\t"
!      "ret"
!    );
! }
  extern void obscure_ccall_ret_code(void);
  #endif
  
  #if defined(x86_64_HOST_ARCH)
! static void GNUC3_ATTRIBUTE(used) obscure_ccall_wrapper(void)
! {
!   __asm__ (
     ".globl " UNDERSCORE "obscure_ccall_ret_code\n"
     UNDERSCORE "obscure_ccall_ret_code:\n\t"
     "addq $0x8, %rsp\n\t"
     "ret"
    );
+ }
  extern void obscure_ccall_ret_code(void);
  #endif
  
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to