Possible Valgrind issue in `dt_write`
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 189
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
$ test/unittest/dtrace-util/tst.ELFGenerationOut.sh /tmp/runtest.10198/bin/dtrace
--149025-- WARNING: unhandled eBPF command 23
==149025== Syscall param write(buf) points to uninitialised byte(s)
==149025== at 0x4AF38D0: write (write.c:26)
==149025== by 0x491460B: dt_write (dt_subr.c:497)
==149025== by 0x48E2286: dump_elf64 (dt_link.c:725)
==149025== by 0x48E2286: dtrace_program_link (dt_link.c:1615)
==149025== by 0x10A0E7: link_prog (dtrace.c:408)
==149025== by 0x10A0E7: main (dtrace.c:1419)
==149025== Address 0x9390b34 is 260 bytes inside a block of size 683 alloc'd
==149025== at 0x485032F: calloc (vg_replace_malloc.c:1675)
==149025== by 0x4914C34: dt_zalloc (dt_subr.c:685)
==149025== by 0x48AB05C: dt_buf_create (dt_buf.c:30)
==149025== by 0x48D4245: dtrace_dof_create (dt_dof.c:824)
==149025== by 0x48DF919: dtrace_program_link (dt_link.c:1570)
==149025== by 0x10A0E7: link_prog (dtrace.c:408)
==149025== by 0x10A0E7: main (dtrace.c:1419)
==149025==
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run test/unittest/dtrace-util/tst.ELFGenerationOut.sh with the reported dtrace binary under Valgrind. Start by tracing the dt_write call in dt_subr.c and the ELF-generation path through dt_link.c, dtrace.c, dt_dof.c, and dt_buf.c. Done means identifying whether the write uses uninitialised bytes and resolving or documenting the warning with a verified test result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100