<Tetralux>
mikdusan: It was an @OpaqueType(). I worked around it now, but I had an OS type (OST) which I described as @OpaqueType(), and was storing it in a struct as ?*OST.
<Tetralux>
Describing `const OST = *@OpaqueType()` (note the *), worked around the assert failure in zig.exe
<Sobeston>
Any good way to find what's crashing the compiler? I've been running zig build-exe and an exe is outputted, but it does literally nothing. I have a std.debug.warn() on the very first line of main, but it doesn't work
<Sobeston>
I'm sure something else in the source is messing the compilation up, but I can't find it
<emekankurumeh[m]>
can you paste the source?
<Sobeston>
I can't, unfortunately - doing a rewrite of closed source code I don't own. Is there any general advice for this sort of thing?
<emekankurumeh[m]>
hmm, are you on windows?
<Sobeston>
yes, and I am calling kernel32 + user32 functions. On 0.4.0
<emekankurumeh[m]>
do you just have a `pub main` in your source file?
<emekankurumeh[m]>
*root file
<Sobeston>
yes. The printing was working earlier, but through the addition of some functions (which I call after the print) it has since stopped
<emekankurumeh[m]>
does it still with those other calls removed?
<Sobeston>
if I remove the calls to those functions, the code still does nothing. But if I comment all the functions out as well as the calls, it works
<emekankurumeh[m]>
can you say what functions you are calling?
<Sobeston>
unfortunately no
<emekankurumeh[m]>
instead of calling std.debug.warn can you try printing to stderr manually without the catch return?
<Sobeston>
same problem as with the warn. I think it's to do with weird pointer casts in the functions - I'll try and find what the problem is and maybe file an issue
<emekankurumeh[m]>
does it occur with any of the functions or is it a specific one?
Tetralux has quit [Ping timeout: 245 seconds]
<Sobeston>
one that calls another
<Sobeston>
I think it might be due to the compiler accidentally accessing the [0] index of an undefined array
<emekankurumeh[m]>
ia the return code non-zero?
<Sobeston>
the compile returns 0, but the executable exits with -1073741511
<Sobeston>
aha if I strip off half (the first 4 bytes) of -1073741511's binary which are all 1, I am left with C0000139. Google seems to suggest that this is entry point not found
Ichorio has joined #zig
ntgg has joined #zig
Tetralux has joined #zig
dimenus has joined #zig
ky0ko has quit [Remote host closed the connection]
<emekankurumeh[m]>
Sahnvour, rust has several coff/pe parsing libraries that might be of use
<scientes>
I think that is pretty readable
<scientes>
wait, ** could be implemented at runtime with @shuffle
<scientes>
on vectors or arrays
ntgg has joined #zig
marijnfs has quit [Quit: WeeChat 2.4]
<Sahnvour>
emekankurumeh[m]: my problem is about the PDB format
<Sahnvour>
or rather, MSF file format ... but in any case we have llvm's doc and code, and microsoft's code, just need to figure out where the error lies