Re: InterlockedExchangeAdd64
Adriaan van Os via fpc-pascal <[email protected]>
| Newsgroups | gmane.comp.compilers.free-pascal.general |
|---|---|
| Message-ID | <[email protected]> |
Sven Barth via fpc-pascal wrote: > Am 10.01.2025 um 15:43 schrieb Adriaan van Os via fpc-pascal: >> >> I have an arm64 (aarch64) test program on MacOS that calls >> InterlockedExchangeAdd64 with a target variable that is not 8-byte >> aligned. Running the test program emits "EBusError: Bus error or >> misaligned data access". >> >> So far so good. >> >> But now I install a system.ErrorProc and run the same program. It >> emits, instead of the EBusError, Runtime Error 214. >> >> This puzzles me. > > This is as designed, because the ErrorProc is what is used by the > SysUtils unit to convert runtime errors to exceptions. If you want to > implement your own handling, then store the original value of ErrorProc, > assign your own handler, do your own handling and at the end call the > saved ErrorProc. I don't want to handle the error, I want a meaningful error. And Runtime Error 214 "Collection overflow" is nonsense. Regards, Adriaan van Os _______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal