runestubbe / Crinkler

Crinkler is an executable file compressor (or rather, a compressing linker) for compressing small 32-bit Windows demoscene executables. As of 2020, it is the most widely used tool for compressing 1k/4k/8k intros.
http://crinkler.net/
Other
1.07k stars 54 forks source link

Wine: crash for all /COMPMODE modes other than INSTANT #16

Open therontarigo opened 10 months ago

therontarigo commented 10 months ago

Tested in Wine 7, Wine 9, 32-bit

Regardless of object inputs, Crinkler gets no further than

Linking...

Forced alignment of 1 code hunk to 1 (including entry point).

Uncompressed size of code:   192
Uncompressed size of data:    10

|-- Estimating models for code ----------------------------|

Oops! Crinkler has crashed.
Dump files written to dump0000_mini.dmp and dump0000_full.dmp

The created dmp files are 0 bytes in size.

When /COMPMODE:INSTANT is specified, Crinkler completes, producing a working executable. releases/crinkler14/crinkler.exe works in all /COMPMODE options, producing a working executable. releases/crinkler20/crinkler.exe without /COMPMODE:INSTANT crashes as above.

From the version history, Switched from Intel OpenMP to MSVC concurrency API. looks to be a suspect.

The DLL and LIB used are copied from Windows and MSVC; the test is a minimal asm:

extern _MessageBoxA@16
extern _ExitProcess@4

global _WinMainCRTStartup

_WinMainCRTStartup:
  push 0
  push msg
  push msg
  push 0
  call _MessageBoxA@16
  push 0
  call _ExitProcess@4

msg: db "hello win32",0