-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return errors from bitmap functions #205
Labels
Milestone
Comments
bgoglin
added a commit
that referenced
this issue
Aug 10, 2016
bgoglin
added a commit
to bgoglin/hwloc
that referenced
this issue
Dec 10, 2017
In case realloc'ing the array of ulongs ever fails. free(), zero() and fill() are the only functions that still return void. Even singlify() can fail if ever called on a bitmap that contains 0 in all preallocated ulongs and the infinite set (we need to alloc an additional ulong and set to 0x1). from_ulong() doesn't currently ever fail but it could if we ever preallocate 0 ulongs. Clsoes open-mpi#205. Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
bgoglin
added a commit
that referenced
this issue
Dec 10, 2017
In case realloc'ing the array of ulongs ever fails. free(), zero() and fill() are the only functions that still return void. Even singlify() can fail if ever called on a bitmap that contains 0 in all preallocated ulongs and the infinite set (we need to alloc an additional ulong and set to 0x1). from_ulong() doesn't currently ever fail but it could if we ever preallocate 0 ulongs. Clsoes #205. Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Fixed in 5bc384f |
rools32
pushed a commit
to rools32/hwloc
that referenced
this issue
Jan 24, 2018
In case realloc'ing the array of ulongs ever fails. free(), zero() and fill() are the only functions that still return void. Even singlify() can fail if ever called on a bitmap that contains 0 in all preallocated ulongs and the infinite set (we need to alloc an additional ulong and set to 0x1). from_ulong() doesn't currently ever fail but it could if we ever preallocate 0 ulongs. Clsoes open-mpi#205. Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most hwloc_bitmap_foo() functions may fail because when the array of ulongs has to be internally realloc'ed to larger (for instance when OR'ing a small bitmap with a long one). We should return 0/-1 to indicate success/failure.
The text was updated successfully, but these errors were encountered: