[DTrace-devel] [PATCH 4/7] Increase the maximum size of strstab
Kris Van Hees
kris.van.hees at oracle.com
Tue Dec 6 21:50:29 UTC 2022
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 at oracle.com>
---
include/dtrace/dif_defines.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dtrace/dif_defines.h b/include/dtrace/dif_defines.h
index 43824646..d88b3b2e 100644
--- a/include/dtrace/dif_defines.h
+++ b/include/dtrace/dif_defines.h
@@ -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 */
--
2.37.2
More information about the DTrace-devel
mailing list