From: Gong Su <go...@ho...> - 2014-09-12 23:04:20
|
Hi, I'm not sure whether this is the right email for reporting yap bugs. I'm trying to compile and run, on 64-bit Intel RedHat Linux, the latest version of yap-6.3 which I got from the git repository using git clone git://git.code.sf.net/p/yap/yap-6.3 I found a couple of bugs: 1. In file C/qlyw.c, function save_int, the local variable v is declared as UInt (8 bytes) instead of int (4 bytes). As a result, the save_bytes call will only save the first 4 bytes of v. On a little endian machine, this happens to be correct. But on a big endian machine, you will get all 0s. 2. When configure yap with the option --enable-threads, you cannot do save_program. save_program will result in a segmentation fault like the following: % % % YAP OOOPS: tried to access illegal address 0x18!!!!. % % % % PC: prolog:qsave_program/1 at clause 1 % Continuation: prolog:qsave_program/1 at clause 1 Active Choice-Points: prolog:$user_call(save_program(test),save_program(test)) prolog:$yes_no(save_program(test),?-) prolog:$catch(_131266,user:$Error(_131266),_1048524) prolog:[Segmentation fault I have tried to do some debugging and it appears that there are predicate structures with garbage FunctorOfPred pointers. I added an fprintf line in save_program function: fprintf(stderr, "%p %x %p\n", pp->FunctorOfPred, pp->FunctorOfPred->KindOfPE, pp->FunctorOfPred->NameOfFE); and here are a few lines (among many): 0x6a87c0 bb00 0x6a8790 0x6a8640 bb00 0x6a8610 0x6a84c0 6a84f0 (nil) 0x6a8370 6a83a0 0x726f5f 0x6a8220 bb00 0x6a8200 0x6a80b0 bb00 0x6a8090 0x6a7f40 bb00 0x6a7f20 0x6a7db0 bb00 0x6a7d80 0x6a7c10 bb00 0x6a7bf0 0x6a7aa0 6a7ad0 0x70666564 0x6a7950 6a7980 0x706665646e 0x6a7800 6a7830 0x6d6574737973 0x6a76b0 6a76e0 0x6d657473 0x6a7540 bb00 0x6a7520 0x6a73d0 bb00 0x68b7d0 0x695fa0 74c540 0x21 0x6a7140 bb00 0x6a7110 0x6a6fc0 bb00 0x6a6f90 0x6a6e40 bb00 0x6a6e10 0x6a6cc0 bb00 0x6a6c90 0x6a6b40 bb00 0x6a6b10 0x6a69c0 bb00 0x6a6990 |