From 2c398752a6d1c4dffdbeedf576dc0ef47ef90844 Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Thu, 25 Nov 2021 22:43:41 -0500 Subject: [PATCH] Make type string buffer 1MiB to (try to) avoid buffer overflow --- src/gc-heap-snapshot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gc-heap-snapshot.cpp b/src/gc-heap-snapshot.cpp index 1689010df76ec..71ac763b415f0 100644 --- a/src/gc-heap-snapshot.cpp +++ b/src/gc-heap-snapshot.cpp @@ -226,9 +226,9 @@ size_t record_node_to_gc_snapshot(jl_value_t *a) JL_NOTSAFEPOINT { : (size_t)jl_datatype_size(type); // print full type - // TODO: We _definitely_ have types longer than 1024 bytes.... + // TODO(PR): Is it possible to use a variable size string here, instead?? ios_t str_; - ios_mem(&str_, 1024); + ios_mem(&str_, 1048576); // 1 MiB JL_STREAM* str = (JL_STREAM*)&str_; jl_static_show(str, (jl_value_t*)type);