bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: seg fault


From: Daniel Diaz
Subject: Re: seg fault
Date: Wed, 12 Dec 2001 11:04:46 +0100

Hi,

thank you for your bug report (can be simplified to the query: X #= Y)
It is an important bug that could also occurs in 32bits machine under certain 
circumstances.

It will be fixed in 1.2.9, however here is a simple diff to fix it if you have 
a source
distribution:

$ diff ~/GP1.2.8/src/BipsPl/term_supp.c ~/New/src/BipsPl/term_supp.c
183c183
<   switch (Tag_Mask_Of(word))
---
>   switch (Tag_Of(word))
191c191
<       if (!generic_var)
---
>       if (generic_var)

I also attach a file for a patch...

Thank you


Bowie Owens wrote:
> 
> Hi,
> 
> I am getting a seg fault using gprolog 1.2.8 on an Alpha/OSF1 machine
> (this problem does not occur under i386/Linux).
> 
> | ?- [user].
> compiling user for byte code...
> ps(L1, L2) :- ps(L1,L2,0).
> ps([], [], _).
> ps([H1|T1], [H2|T2], P) :- H2 #= H1 + P, ps(T1, T2, H2).
> 
> user compiled, 3 lines read - 803 bytes written, 1209 ms
> 
> (3 ms) yes
> | ?- ps([1,2,3], L).
> 
> L = [1,3,6]
> 
> (1 ms) yes
> | ?- length(BL, 2), ps(BL, SL).
> uncaught exception: error(type_error(integer,'A'),bind_variables/2)
> | ?- length(BL, 672), ps(BL, SL).
> 
> Fatal Error: Segmentation Violation
> 
> -- Bowie Owens
> 
> CSIRO Mathematical & Information Sciences
> phone : +61 3 9545 8055
> email : address@hidden

-- 
Daniel Diaz   address@hidden
http://pauillac.inria.fr/~diaz
gprolog --version 2>&1 | sed -n -e 's/By //p'
*** /home/diaz/GP1.2.8/src/BipsPl/term_supp.c   Tue Jan 23 12:38:20 2001
--- /home/diaz/New/src/BipsPl/term_supp.c       Wed Dec 12 10:47:23 2001
***************
*** 180,186 ****
  
    DEREF(start_word, word, tag_mask);
  
!   switch (Tag_Mask_Of(word))
      {
      case REF:
        (*fct) (UnTag_REF(word), word);
--- 180,186 ----
  
    DEREF(start_word, word, tag_mask);
  
!   switch (Tag_Of(word))
      {
      case REF:
        (*fct) (UnTag_REF(word), word);
***************
*** 188,194 ****
  
  #ifndef NO_USE_FD_SOLVER
      case FDV:
!       if (!generic_var)
        (*fct) (UnTag_FDV(word), word);
        break;
  #endif
--- 188,194 ----
  
  #ifndef NO_USE_FD_SOLVER
      case FDV:
!       if (generic_var)
        (*fct) (UnTag_FDV(word), word);
        break;
  #endif

reply via email to

[Prev in Thread] Current Thread [Next in Thread]