Open sdimitro opened 4 years ago
Similar issues using zero-length arrays (rm_row
is a zero-length array, declared as raidz_row_t *rm_row[0];
sdb> echo 0xffff929d5cd71d40 | cast zio_t * | member io_vsd | cast raidz_map_t* | member rm_row
sdb encountered an internal error due to a bug. Here's the
information you need to file the bug:
----------------------------------------------------------
Target Info:
ProgramFlags.IS_LINUX_KERNEL
Platform(<Architecture.X86_64: 1>, <PlatformFlags.IS_LITTLE_ENDIAN|IS_64_BIT: 3>)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sdb/internal/repl.py", line 107, in eval_cmd
for obj in invoke(self.target, [], input_):
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 147, in invoke
yield from execute_pipeline(first_input, pipeline)
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 84, in execute_pipeline
yield from massage_input_and_call(pipeline[-1], this_input)
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 43, in massage_input_and_call
yield from cmd.call(objs)
File "/usr/lib/python3/dist-packages/sdb/command.py", line 329, in call
result, not issubclass(self.__class__, SingleInputCommand))
File "/usr/lib/python3/dist-packages/sdb/command.py", line 292, in __invalid_memory_objects_check
obj.read_()
TypeError: cannot read object with incomplete array type
sdb> echo 0xffff929d5cd71d40 | cast zio_t * | member io_vsd | cast raidz_map_t* | member rm_row[0]
sdb encountered an internal error due to a bug. Here's the
information you need to file the bug:
----------------------------------------------------------
Target Info:
ProgramFlags.IS_LINUX_KERNEL
Platform(<Architecture.X86_64: 1>, <PlatformFlags.IS_LITTLE_ENDIAN|IS_64_BIT: 3>)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sdb/internal/repl.py", line 107, in eval_cmd
for obj in invoke(self.target, [], input_):
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 147, in invoke
yield from execute_pipeline(first_input, pipeline)
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 84, in execute_pipeline
yield from massage_input_and_call(pipeline[-1], this_input)
File "/usr/lib/python3/dist-packages/sdb/pipeline.py", line 43, in massage_input_and_call
yield from cmd.call(objs)
File "/usr/lib/python3/dist-packages/sdb/command.py", line 329, in call
result, not issubclass(self.__class__, SingleInputCommand))
File "/usr/lib/python3/dist-packages/sdb/command.py", line 290, in __invalid_memory_objects_check
for obj in objs:
File "/usr/lib/python3/dist-packages/sdb/command.py", line 375, in _call
yield from result
File "/usr/lib/python3/dist-packages/sdb/commands/member.py", line 311, in _call_one
yield self._eval_member_terms(obj, terms)
File "/usr/lib/python3/dist-packages/sdb/commands/member.py", line 293, in _eval_member_terms
self._validate_array_index(obj.type_, idx)
File "/usr/lib/python3/dist-packages/sdb/commands/member.py", line 276, in _validate_array_index
if type_.length <= idx:
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
It would be nice if member zero_length_array[N]
worked (perhaps with a warning), and also if you could use array N
to iterate over the entries in the array, given the number of entries.