Hi Fantec,
This is actually a bug in your test program; if you compile with -Wall you
see:
t.c:50:2: warning: implicit declaration of function ‘mremap’
[-Wimplicit-function-declaration]
t.c:50:7: warning: assignment makes pointer from integer without a cast
[enabled by default]
Without seeing a definition of mremap the compiler is assuming it returns an
int.
Then because it's assuming that mremap returns an int, then it gets cast when
it fills in the pointer.
If you put a #define __USE_GNU before the include of sys/mman.h (and an undef
after it) it picks up the mremap definition
and all works fine.
(Always use -Wall !)
** Changed in: glibc (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/175533
Title:
mremap returns a bogus pointer in 64 bits (feisty)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/175533/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs