DragonFly bugs List (threaded) for 2009-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: zero-size malloc and ps: kvm_getprocs: Bad address
YONETANI Tomokazu wrote:
Hello.
On recent -DEVELOPMENT ps command displays a non-intuitive error message
on a non-existent pid:
ps: kvm_getprocs: Bad address
Apparently the recent malloc reimplementation has changed malloc(3) family
so as malloc(0) now returns a pointer such that useracc() returns EFAULT
for it.
I think we should make malloc(0) return a valid pointer. Whether to
return NULL or a pointer is implementation specific, and I believe our
previous malloc, and most other mallocs out there indeed return a pointer
and don't return NULL.
cheers
simon
--
<3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\
rock the past +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]