Re: The same mmap problem in gprolog-1.2.8 and gprolog-1.2.11

Daniel Diaz <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Thank you,

P 1 is an error in configure.in - should be -mcpu=i486 (and not
-mcpu=486)

P 2 is fixed as you said

P 3 has been fixed 2 days ago in the future (pre 1.2.12). This fixes a
severe limitation
    to 64MB for all stacks. Under ix86/linux I can now allocate much
more (on my P4 with
    512Mb of RAM + 512Mb of swap I can allocate up to 900Mb). When I put
1.2.11 could you
    try on your ix86/solaris machine please ?

Thank you again for both your detailed report and for your effort to
understand where the problems came from.


Tamás Laufer wrote:
> 
> Dear Mr. Diaz,
> 
> I can find three problems with gprolog on my ix86/solaris 8 with gcc-2.95.3.
> The first is a new problem in version 1.2.11, the second is solved by version
> 1.2.11.
> 
> *************************
> *************************
> About the target machine:
> *************************
> *************************
> bash-2.03# gcc --version
> 2.95.3
> bash-2.03# uname -X
> System = SunOS
> Node = solaris
> Release = 5.8
> KernelID = Generic_108529-11
> Machine = i86pc
> BusType = <unknown>
> Serial = <unknown>
> Users = <unknown>
> OEM# = 0
> Origin# = 1
> NumCPU = 1
> 
> *************************************
> *************************************
> PROBLEM I. concerning gprolog-1.2.11)
> The gcc can't accept the '-march=' switch value given it by the gplc when
> compiling gprolog-1.2.11:
> *************************************
> *************************************
> bash-2.03# ./configure --prefix=/opt/sfw
> checking for gcc... gcc
> checking for C compiler default output... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for executable suffix...
> checking for object suffix... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for ranlib... ranlib
> checking whether make sets ${MAKE}... yes
> checking for a BSD compatible install... ./install-sh -c
> checking whether ln -s works... yes
> checking build system type... i386-pc-solaris2.8
> checking host system type... i386-pc-solaris2.8
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... no
> checking for unistd.h... yes
> checking for long... yes
> checking size of long... 4
> checking for sys/ioctl_compat.h... no
> checking for termios.h... yes
> checking for malloc.h... yes
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for getpagesize... yes
> checking for working mmap... yes
> checking for mallopt... no
> checking for mkstemp... yes
> checking for fgetc... yes
> checking for gcc option to accept ANSI C... none needed
> checking for inline... inline
> use ebp and move -fomit-frame-pointer to CFLAGS_MACHINE
> checking for socket... no
> checking for socket in -lsocket... yes
> checking for gethostbyname... no
> checking for gethostbyname in -lnsl... yes
> DIRECTORIES
> --> Installation:       /opt/sfw/gprolog-1.2.11
> --> Link to binaries:   /opt/sfw/bin
> --> Documentation:      /opt/sfw/gprolog-1.2.11/doc
> --> HTML documentation: /opt/sfw/gprolog-1.2.11/doc/Html
> --> Examples:           /opt/sfw/gprolog-1.2.11
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating TopComp/Makefile
> config.status: creating Pl2Wam/Makefile
> config.status: creating Wam2Ma/Makefile
> config.status: creating Ma2Asm/Makefile
> config.status: creating Fd2C/Makefile
> config.status: creating Linedit/Makefile
> config.status: creating W32GUICons/Makefile
> config.status: creating EnginePl/Makefile
> config.status: creating BipsPl/Makefile
> config.status: creating EngineFD/Makefile
> config.status: creating BipsFD/Makefile
> config.status: creating EnginePl/gp_config.h
> config.status: EnginePl/gp_config.h is unchanged
> bash-2.03#
> 
> bash-2.03# gmake
> (cd EnginePl; gmake config)
> gmake[1]: Entering directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/EnginePl'
> gcc -O3   -o pl_config pl_config.c
> ./pl_config
> 
>         -------------------------------
>         --- GNU PROLOG INSTALLATION ---
>         -------------------------------
> 
> GNU Prolog version: 1.2.11 (Mar 19 2002)
> Operating system  : solaris2.8
> Processor         : i386
> Size of a word    : 32 bits
> C compiler        : gcc
> C flags           : -O3
> C flags machine   : -march=486 -fomit-frame-pointer
> Loader flags      :
> Loader libraries  : -lm -lsocket -lnsl
> Use line editor   : Yes
> Use piped consult : Yes
> Use sockets       : Yes
> Use FD solver     : Yes
> Use fast call     : Yes
> Use machine regs. : Yes
> Used register(s)  : ebx ebp
> 
>         ------------------------------
> 
> (cd ../TopComp; gmake gplc)
> gmake[2]: Entering directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/TopComp'
> gcc -O3  -o gplc top_comp.c -lm -lsocket -lnsl
> gmake[2]: Leaving directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/TopComp'
> gmake[1]: Leaving directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/EnginePl'
> . ./SETVARS;for i in TopComp EnginePl Wam2Ma Ma2Asm Linedit BipsPl Pl2Wam Fd2C
> EngineFD BipsFD;do (cd $i; gmake) || exit 1; done;\
> (cd TopComp; gmake gprolog)
> gmake[1]: Entering directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/TopComp'
> gcc -O3  -o hexgplc hexfilter.c
> gmake[1]: Leaving directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/TopComp'
> gmake[1]: Entering directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/EnginePl'
> gcc -O3   -o cpp_headers cpp_headers.c
> D=`(cd ..;for i in *;do test -d $i && X="$X
> /export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/$i";done;echo
> $X)`; ./cpp_headers headers.h gprolog.h $D
> gplc -c -C '-O3 ' obj_begin.c
> cc1: bad value (486) for -march= switch
> compilation failed
> gmake[1]: *** [obj_begin.o] Error 1
> gmake[1]: Leaving directory
> `/export/home/opt/sfw/internet_download/work/gprolog-1.2.11/src/EnginePl'
> gmake: *** [all] Error 1
> bash-2.03#
> ******************************************************************************************
> I note: There is no '-march=' problem with the stable version gprolog 1.2.8.
> ******************************************************************************************
> 
> ************************************************************
> ************************************************************
> PROBLEM II.concerning gprolog-1.2.8) mmap/MAP_FIXED problem.
> ************************************************************
> ************************************************************
> Let me omit to supply the large volumened machine output, I beleive I can
> explain the problem.
> I refer to gprolog source files machine.h and machine.c, specifically to the
> function def.
> void M_Allocate_Stacks(void).
> The soalris 8 mmap gives a '0xdzzzzz00' formed  addr  without MAP_FIXED. Because
> this value contains the sign bit=1 this allocation is not acceptable by gprolog.
> Using M_MMAP_HIGH_ADR_ALT with MAP_FIXED is a solution to this PROBLEM.
> This is already solved in gprolog-1.2.11.
> 
> **************************************************************************************
> **************************************************************************************
> PROBLEM III.concerning gprolog-1.2.8 and 1.2.11) mmap addr acceptability test
> problem.
> **************************************************************************************
> **************************************************************************************
> The function void M_Allocate_Stacks(void) in machine.c contains the following
> code fragment:
> .......................
> .......................
> #ifdef M_ix86_win32
>   if (addr == NULL)
> #else
>   if ((long) addr == -1
>       || ((long) addr & (((1L << TAG_SIZE) - 1) << VALUE_SIZE)) != 0)
> #endif
>     {
> #if !defined(M_ix86_win32) && defined(M_MMAP_HIGH_ADR_ALT)
> .......................
> .......................
> The bitmask (((1L << TAG_SIZE) - 1) << VALUE_SIZE) is not appropriate to test
> the clearness of TAG bits in addr. This test fails with a good addr ==
> 0x3dff0000.
> I think it would be correct to test under the mask TAG_MASK.
> 
> Yours sincerely,
> Tamas Laufer
> 
> _______________________________________________
> Bug-prolog mailing list
> [email protected]
> http://mail.gnu.org/mailman/listinfo/bug-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.