From 1faa0c98892ed4612b2f662444993191752d1d20 Mon Sep 17 00:00:00 2001 From: lmp Date: Sat, 15 Jun 2024 11:46:45 +0200 Subject: [PATCH] tests: add header text to `crash_with_gc.vv` --- tests/crash_with_gc.vv | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/crash_with_gc.vv b/tests/crash_with_gc.vv index 9e5bb854..92b1f00f 100644 --- a/tests/crash_with_gc.vv +++ b/tests/crash_with_gc.vv @@ -1,3 +1,10 @@ +// This file serves as a MRE (minimal reproducible example) of a runtime crash triggered by compiling and running +// this file with just `v run ~/.vmodules/sdl/tests/crash_with_gc.vv`. On some setups, the problem seems to be +// memory corruption happening between actions in SDL2's memory allocations and V's default garbage collector. +// Especially when a lot of heap allocations occur. +// +// The example does not crash if compiled with `-d sdl_memory_no_gc`. +// See also: https://github.com/vlang/sdl/issues/744 module main import sdl