You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If HAVE_JSON_U64=1, utils/json.c:display_hex() can call json_object_get_int64()
on a struct json_object created with json_object_new_uint64(). In the context of
'ndctl list --regions --human', this results in a static value of 0x7fffffffffffffff
being displayed for iset_id, as seen in pmem#217.
Correct hex values are observed with the use of json_object_get_uint64(). To support
builds against older json-c, use a new static inline function util_json_get_u64() to
fallback to json_object_get_int64() if HAVE_JSON_U64=0.
Link: pmem#217
Fixes: 691cd24 ("json: Add support for json_object_new_uint64()")
Signed-off-by: Justin Ernst <[email protected]>
If HAVE_JSON_U64=1, utils/json.c:display_hex() can call
json_object_get_int64() on a struct json_object created with
json_object_new_uint64(). In the context of 'ndctl list --regions
--human', this results in a static value of 0x7fffffffffffffff being
displayed for iset_id, as seen in #217.
Correct hex values are observed with the use of
json_object_get_uint64(). To support builds against older json-c, use a
new static inline function util_json_get_u64() to fallback to
json_object_get_int64() if HAVE_JSON_U64=0.
Link: #217
Fixes: 691cd24 ("json: Add support for json_object_new_uint64()")
Signed-off-by: Justin Ernst <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vishal Verma <[email protected]>
ndctl v73 seems to suffer from what looks like an integer overflow when displaying region iset_id, here's an example:
instead of the expected
git bisection points to the following commit as the culprit behind
this regression
Cheers,
Hedi.
The text was updated successfully, but these errors were encountered: