[RPL/2] RPL/2 4.0.15

DEMAINE Benoit-Pierre benoit at demaine.info
Lun 24 Mai 15:06:50 CEST 2010


On 24/05/10 11:13, BERTRAND Joel wrote:
>> J'ai eu les warnings pour la 4.0.14, mais l'erreur de mremap/malloc est
>> nouvelle pour la 4.0.15
> 
>     Malloc comes from libptmalloc3.a and not from libc due to some
> strange malloc flavours. I don't understand why gento complaims about
> libptmalloc3 because ptmalloc is used by GNU libc...

It complains about the manner you use it. Not the fact you use it.

And my question was: did you change some calls about mrealloc between
4.0.14 and 4.0.15 ?

> and final executable has :
> ET_EXEC RWX --- RW- ./rpl
> 
>     If you find an explanation, please send me a mail. RPL/2 doesn't use
> executable in stack.

Maybe the answer could be in the logs of linker ?

>>   * malloc.c:3553: warning: implicit declaration of function 'mremap'

Trivial to fix.

Hmmm ... depends where this file is.

>>   * Function `mremap' implicitly converted to pointer at malloc.c:3553
>>   *
> 
>     This allocator comes from glibc and has been tested in 64 bits mode
> on several systems and architecture (including sparc64 with alignement).
> This last message is a false alarm because ptmalloc3 is a system level
> library, not a user level one.

Maybe this last message will go away when (if) you fix the previous one
(implicit declaration).

Build log says:

> make[3]: Entering directory `/var/tmp/portage/doublehp-dhp/rpl2-4.0.15/work/rpl-4.0.15/ptmalloc3'
> gcc -c -O2 -march=athlon64 -pipe -O2 -malign-double -mieee-fp -Wall -funsigned-char -Wno-pointer-sign  -g -O2  -Wall -Wstrict-prototypes -DUSE_TSD_DATA_HACK -D_REEN
> TRANT -Isysdeps/pthread -Isysdeps/generic -I. -DTHREAD_STATS=1  -DMSPACES=1 ptmalloc3.c
> gcc -c -O2 -march=athlon64 -pipe -O2 -malign-double -mieee-fp -Wall -funsigned-char -Wno-pointer-sign  -g -O2  -Wall -Wstrict-prototypes -DUSE_TSD_DATA_HACK -D_REEN
> TRANT -Isysdeps/pthread -Isysdeps/generic -I. -DTHREAD_STATS=1  -DONLY_MSPACES -DUSE_LOCKS=0 malloc.c
> malloc.c: In function 'mmap_resize':
> malloc.c:3553: warning: implicit declaration of function 'mremap'
> malloc.c:3553: warning: cast to pointer from integer of different size
> malloc.c: In function 'sys_trim':
> malloc.c:3981: warning: comparison between pointer and integer
> ar cr libptmalloc3.a ptmalloc3.o malloc.o
> ranlib libptmalloc3.a

Only one occurence of the message.

It is the only implicit declaration in the full log (20k lines). And I
think it may fix the implicit convertion one. Those messages are not in
4.0.14. So, for me, you altered the file (the bad way) those last days
(new code is wrong).

I don't understand your code, I am not able to write a patch to test a
manual declaration ...

-- 
 >o_/ DEMAINE Benoit-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would'nt have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)


Plus d'informations sur la liste de diffusion RPL2