Odin icon indicating copy to clipboard operation
Odin copied to clipboard

-no-crt with -debug causes access violation in default temp allocator on close

Open Lperlind opened this issue 3 years ago • 6 comments

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Odin: dev-2022-03:d4ccb69c OS: Windows 10 Home Basic (version: 21H2), build 19044.1586 CPU: AMD Ryzen 7 5800X 8-Core Processor RAM: 32711 MiB

Expected Behavior

Nothing to be thrown and the application to exit cleanly

Current Behavior

When the application is closed an access violation is thrown in default_temporary_allocator.odin, line 35 i.e.

default_temp_allocator_destroy :: proc(s: ^Default_Temp_Allocator) {
	if s == nil {
		return
	}
	for ptr in s.leaked_allocations { << access violation here
		free(raw_data(ptr), s.backup_allocator)
	}
	delete(s.leaked_allocations)
	delete(s.data, s.backup_allocator)
	s^ = {}
}

Failure Information (for bugs)

Steps to Reproduce

Just compile and run the minimal setup i.e.

package main
main :: proc() { }

Lperlind avatar Mar 14 '22 03:03 Lperlind

it segfaults at the same place in #1570. are you able to test the diff for workaround it (it requires recompiling odin binary) ?

semarie avatar Mar 14 '22 05:03 semarie

Still have the access violation after the patch

Lperlind avatar Mar 14 '22 06:03 Lperlind

thanks for testing it. so it might be something else

semarie avatar Mar 14 '22 07:03 semarie

Hello!

I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..

github-actions[bot] avatar Jul 24 '22 22:07 github-actions[bot]

Can this be re-opened? The issue is still present. Additionally this occurs without debug flags.

Lperlind avatar Sep 03 '22 07:09 Lperlind