Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Assertion bug when aliasing procedure multiple times in a specific way

Open ftphikari opened this issue 2 years ago • 1 comments

Context

    Odin: dev-2022-04:f92ffe60
    OS:   Windows 10 Unknown Edition (0000007d) (version: 21H2), build 19044.1645
    CPU:  Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
    RAM:  8086 MiB

Bug

In this directory structure: image

alias.odin

package alias

import a "alias_pkg"

main :: proc() {
	a.wait_vblank()
}

alias_pkg.odin

package alias_pkg

wait_vblank :: _wait_vblank

alias_pkg_windows.odin

//+build windows
package alias_pkg

import win32 "core:sys/windows"

_wait_vblank :: win32.DwmFlush

When compiling this error happens:

Odin\src\llvm_backend_proc.cpp(65): Assertion Failure: `entity->flags & EntityFlag_ProcBodyChecked` DwmFlush :: proc "stdcall" () -> HRESULT

ftphikari avatar Apr 19 '22 22:04 ftphikari

but is still there

ftphikari avatar Sep 15 '22 09:09 ftphikari

Update: as of 5d39780 this produces a different message:

Odin\src\llvm_backend_proc.cpp(72): Panic: DwmFlush :: proc "stdcall" () -> HRESULT (was parapoly: 0 0)

ftphikari avatar Jan 17 '23 14:01 ftphikari

I have seen this bug too. Seems to happen when trying to resolve overloads but I'm not exactly sure when it gets triggered.

Beefster09 avatar Sep 09 '23 23:09 Beefster09