Re: zero-size malloc and ps: kvm_getprocs: Bad address

看板DFBSD_bugs作者時間16年前 (2009/05/24 16:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/6 (看更多)
YONETANI Tomokazu wrote: > Hello. > On recent -DEVELOPMENT ps command displays a non-intuitive error messag= e > on a non-existent pid: > ps: kvm_getprocs: Bad address >=20 > Apparently the recent malloc reimplementation has changed malloc(3) fam= ily > so as malloc(0) now returns a pointer such that useracc() returns EFAUL= T > for it. I think we should make malloc(0) return a valid pointer. Whether to=20 return NULL or a pointer is implementation specific, and I believe our=20 previous malloc, and most other mallocs out there indeed return a pointer= =20 and don't return NULL. cheers simon --=20 <3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\ rock the past +++ space for low =E2=82=AC=E2=82=AC=E2=82=AC NOW!1 += ++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
文章代碼(AID): #1A6GO700 (DFBSD_bugs)
討論串 (同標題文章)
文章代碼(AID): #1A6GO700 (DFBSD_bugs)