Page MenuHomeFreeBSD

libdtrace: fix function name truncation
ClosedPublic

Authored by markj on Nov 16 2014, 4:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 18, 6:59 AM
Unknown Object (File)
Sat, Jan 18, 5:55 AM
Unknown Object (File)
Mon, Jan 13, 12:19 PM
Unknown Object (File)
Fri, Jan 3, 6:30 PM
Unknown Object (File)
Dec 9 2024, 10:16 PM
Unknown Object (File)
Dec 6 2024, 1:35 PM
Unknown Object (File)
Nov 30 2024, 5:07 PM
Unknown Object (File)
Nov 24 2024, 1:08 PM
Subscribers
None

Details

Summary

This is described in PR 194757: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194757

Basically, dtrace -G will create a DOF section for the specified probes, which gets linked into the final executable or library. It's also used to generate the symbol table for the generated object file.

DTrace probe function names are currently limited to 128 characters. In particular, they can be truncated before they get inserted into the DOF, so the generated object file can end up with a reference to a truncated symbol, causing a compilation error. With this change, they're not truncated before being written to the DOF. Instead, we rely on the kernel to enforce the 128-byte limit when the DOF is loaded into the kernel during process startup.

The 128-byte limit should probably be raised or eliminated, but that's a separate change.

Test Plan

No regressions in the test suite (most of the USDT tests fail at the moment for trivial reasons anyway); firefox and seamonkey builds used to fail with USDT enabled because of this bug - they now build cleanly; ruby USDT still works properly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

markj retitled this revision from to libdtrace: fix function name truncation.
markj updated this object.
markj edited the test plan for this revision. (Show Details)
markj added a reviewer: DTrace.
rpaulo added a reviewer: rpaulo.
This revision is now accepted and ready to land.Nov 16 2014, 5:02 AM
markj updated this revision to Diff 2441.

Closed by commit rS274637 (authored by @markj).