Skip to content

Commit 2c39875

Browse files
committed
Make type string buffer 1MiB to (try to) avoid buffer overflow
1 parent 2b2c3ab commit 2c39875

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gc-heap-snapshot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ size_t record_node_to_gc_snapshot(jl_value_t *a) JL_NOTSAFEPOINT {
226226
: (size_t)jl_datatype_size(type);
227227

228228
// print full type
229-
// TODO: We _definitely_ have types longer than 1024 bytes....
229+
// TODO(PR): Is it possible to use a variable size string here, instead??
230230
ios_t str_;
231-
ios_mem(&str_, 1024);
231+
ios_mem(&str_, 1048576); // 1 MiB
232232
JL_STREAM* str = (JL_STREAM*)&str_;
233233

234234
jl_static_show(str, (jl_value_t*)type);

0 commit comments

Comments
 (0)