DragonFly bugs List (threaded) for 2009-05
DragonFly BSD
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


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Sun, 24 May 2009 20:58:46 +0200

Matthew Dillon wrote:
    We currently return an invalid non-NULL pointer, ZERO_LENGTH_PTR,
    which I have set to ((void *)-8).

    We can change ZERO_LENGTH_PTR to be whatever we want, including
    making it a pointer to valid memory like the address of a dummy
    global.

The standard however demands a unique pointer to be returned - we can't return a constant pointer. I think rounding up to the minimal size sounds good.


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]