From: "tenderlovemaking (Aaron Patterson) via ruby-core" Date: 2025-03-19T19:39:16+00:00 Subject: [ruby-core:121412] [Ruby Bug#19841] Marshal.dump stack overflow with recursive Time Issue #19841 has been updated by tenderlovemaking (Aaron Patterson). Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED to 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE Backported to 3.4 in ae2fcdc0f705e767045c2bd5253e8eae733d2edb ---------------------------------------- Bug #19841: Marshal.dump stack overflow with recursive Time https://bugs.ruby-lang.org/issues/19841#change-112390 * Author: segiddins (Samuel Giddins) * Status: Closed * ruby -v: 3.2.2 * Backport: 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE ---------------------------------------- ``` ruby #!/usr/bin/env ruby puts RUBY_VERSION t = Time.at(0, 1, :nanosecond) t.instance_variable_set :@itself, t Marshal.dump(t) ``` Yields a stack overflow error from the `Marshal.dump` call, even though Marshal is explicitly able to handle cyclical references -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/