v icon indicating copy to clipboard operation
v copied to clipboard

fireworks example crashes when compiled with -autofree

Open pseudomo opened this issue 5 years ago • 2 comments

V full version: V 0.2.4 c847152 OS: windows, Microsoft Windows 10 Business v19043 64-bit

What did you do? Compiled v as follows: make -clang

Compiled fireworks example with -autofree option v . -autofree

What did you expect to see? Application is running, memory is freed automatically

What did you see instead? Application started but after a few seconds crashed with the following error: Unhandled Exception 0xC0000374 C:/Users/User/AppData/Local/Temp/v/fireworks.10589391097515234349.tmp.c:9913: at print_backtrace_skipping_top_frames_tcc: Backtrace C:/Users/User/AppData/Local/Temp/v/fireworks.10589391097515234349.tmp.c:9880: by print_backtrace_skipping_top_frames C:/Users/User/AppData/Local/Temp/v/fireworks.10589391097515234349.tmp.c:9938: by unhandled_exception_handler 7ffebc8e8a4c : by ???

pseudomo avatar Sep 10 '21 19:09 pseudomo

Same here on amd64 Linux. Mine doesn't crash though; it runs and then the first firework freezes at the bottom of the screen. It throws an error of

7f3189cea0e1 : at ???: RUNTIME ERROR: invalid memory access

Just for some additional info, I don't see memory leaks even without autofree, -gc boehm also doesn't leak. It stabilizes at around 70 MB.

V doctor
OS: linux, "Solus"
CC version: cc (Solus) 11.2.0 (basically gcc)

V full version: V 0.2.4 72089c4.cd7d482

Git version: git version 2.32.0
Git vroot status: weekly.2021.36-46-gcd7d482c
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 333c14de

GZGavinZhao avatar Sep 12 '21 19:09 GZGavinZhao

With latest V, I get this:

[jamie@5950x examples]$ v -autofree run fireworks
malloc(): unsorted double linked list corrupted
7f480ae20d22 : at ???: RUNTIME ERROR: abort() called
malloc(): unsorted double linked list corrupted
Terminated by signal 134 (SIGABRT)
[jamie@5950x examples]$ 

JalonSolov avatar Sep 29 '21 03:09 JalonSolov