Open amahmudTT opened 2 days ago
Is there a reason you're using -D rather than -d (disassembling all sections, rather than just executable ones)
Is there a reason you're using -D rather than -d (disassembling all sections, rather than just executable ones)
No, I think it was a mistake in my part
ok, use '-d' the crash is happening because the section (.comment) is not an integral number of instructions. Here's a smaller reproducer:
.text
lui a0,0x12345
addi a0,a0,0x678
.byte 2 ;; delete to remove crash
tt_metal/third_party/sfpi/compiler/bin/riscv32-unknown-elf-as -o asm.o asm.s
tt_metal/third_party/sfpi/compiler/bin/riscv32-unknown-elf-objdump -d asm.o
(because this is .text it'll crash with -d)
You meant crash with -D and not -d ?
no, that shorter example is an oddly-sized executable section, which both -d and -D attempt to disassemble
Ok, so is it still a bug then ? Or did I just use the wrong command ?
it is still a bug, but won't normally affect things -- use -d and usually text sections are integral numbers of instructions
ok
Describe the bug Branch : https://github.com/tenstorrent/tt-metal/compare/main...amahmud/fp32_perf Test case : tests/tt_metal/tt_metal/test_eltwise_add.cpp
This test case has empty reader and writer, it will compile and theoretically should work. But when we built the files and tried to disassemble the trisc0/1/2.elf files, it shows the disassembly but crashes in the end saying segmentation fault. So piping the output to a file is problematic.
To Reproduce
tt-metal/build_Release/test/tt_metal
tt-metal/built
folder My disassembly command was as follows :$tt_dir/tt_metal/third_party/sfpi/compiler/bin/riscv32-unknown-elf-objdump -D -S -t -g -C
The disassembler should crash with Segmentation Fault message.
environment information:
Additional context This test case is unique as the readers and writers are empty. I managed to get the assembly output to a file using linux script command. Hence the ^M