I get a "Threading has been used before cthreads was initialized." crash for a 
simple program

program test;
uses cthreads;
begin
  writeln( 'Hello')
end.

on macos 14.2.1 with a fpc 3.3.1-14334-g5205ce30f4 snapshot, but the crash only occurs with mode -Mmacpas (which I assumes implicitely uses some unit that causes the issue).

Regards,

Adriaan van Os

administrator% uname -a
Darwin AdministorsMini 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64

administrator% /usr/local/lib/fpc/3.3.1/ppca64 -iW
3.3.1-14334-g5205ce30f4

administrator% /usr/local/lib/fpc/3.3.1/ppca64 test.pas
Free Pascal Compiler version 3.3.1-14334-g5205ce30f4 [2023/11/06] for aarch64
Copyright (c) 1993-2023 by Florian Klaempfl and others
Target OS: Darwin for AArch64
Compiling test.pas
Assembling (pipe) test.s
Linking test
-macosx_version_min has been renamed to -macos_version_min
6 lines compiled, 0.3 sec, 196608 bytes code, 81919 bytes data

administrator% ./test
Hello

administrator% /usr/local/lib/fpc/3.3.1/ppca64 -Mmacpas test.pas
Free Pascal Compiler version 3.3.1-14334-g5205ce30f4 [2023/11/06] for aarch64
Copyright (c) 1993-2023 by Florian Klaempfl and others
Target OS: Darwin for AArch64
Compiling test.pas
Assembling (pipe) test.s
Linking test
-macosx_version_min has been renamed to -macos_version_min
6 lines compiled, 0.1 sec, 540672 bytes code, 163839 bytes data

administrator% ./test
Threading has been used before cthreads was initialized.
Make cthreads one of the first units in your uses clause.
Runtime error 211 at $0000000100B52E2C
  $0000000100B52E2C
  $0000000100AF409C
  $0000000100ADB390
  $0000000100B01BDC
  $0000000100ADB310
  $0000000100ADB368
  $000000018BF010E0
  $F35F800000000000
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to