Skip to content

Commit

Permalink
Increase the maximum size of strstab
Browse files Browse the repository at this point in the history
The strtab size was limited in the legacy version to 0x7fff.  This
was generally sufficient because of how the strtab was implemented.
Now that all strings used in a probe program are stored in a single
strtab (incl. probe description names), a higher limit is needed.

All string offsets (and strtab size calculations) are using ssize_t,
so we use SSIZE_MAX as the upper limit.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
kvanhees committed Dec 8, 2022
1 parent 6edf90b commit 0045dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dtrace/dif_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
#endif

#define DIF_INTOFF_MAX 0xffff /* highest integer table offset */
#define DIF_STROFF_MAX 0x7fff /* highest string table offset */
#define DIF_STROFF_MAX SSIZE_MAX /* highest string table offset */
#define DIF_REGISTER_MAX 0xff /* highest register number */
#define DIF_VARIABLE_MAX 0xffff /* highest variable identifier */
#define DIF_SUBROUTINE_MAX 0xffff /* highest subroutine code */
Expand Down

0 comments on commit 0045dd7

Please sign in to comment.