Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2020-01

SEH-based exceptions enabled on win32

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

SEH-based exceptions are made the default on the win32 target in fpc-trunk. For win64 they already where the default.

To build a compiler without SEH-based exceptions, the dDISABLE_WIN32_SEH option should be given. ie:

make all OPT='dDISABLE_WIN32_SEH'

Please report any regressions on the bug-tracker.

Regards,

Joost

Reply by email

J. Gareth Moreton
to Joost van der Sluis

Has code generation changed as a result? I recall i386 making heavy use of push and pop within routines rather than pre-reserving the stack in the prologue - this is a big no-no for SEH if I recall.

Gareth aka. Kit

Joost van der Sluis wrote 19 lines
Hi all, SEH-based exceptions are made the default on the win32 target in fpc-trunk. For win64 they already where the default. To build a compiler without SEH-based exceptions, the dDISABLE_WIN32_SEH option should be given. ie: make all OPT='dDISABLE_WIN32_SEH' Please report any regressions on the bug-tracker. Regards, Joost _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Sven Barth
to J. Gareth Moreton

J. Gareth Moreton schrieb am Fr., 10. Jan.
2020, 01:20:

Has code generation changed as a result? I recall i386 making heavy use of push and pop within routines rather than pre-reserving the stack in the prologue - this is a big no-no for SEH if I recall.

That might be due to the stack alignment that was recently introduced as well.

Whether the stack of is manipulated with push/pop or is reserved in one go shouldn't matter for SEH as the original stack pointer is stored in EBP anyway and thus can be restored (or stored on the stack in nested calls and can be restored from there as it's one of the first actions done in the prologue).

Regards,
Sven

Reply by email

Florian Klämpfl
to Sven Barth
Sven Barth wrote 9 lines
J. Gareth Moreton schrieb am Fr., 10. Jan. 2020, 01:20: > Has code generation changed as a result? I recall i386 making heavy use > of push and pop within routines rather than pre-reserving the stack in > the prologue - this is a big no-no for SEH if I recall. That might be due to the stack alignment that was recently introduced as well.

win32 does not use the 16 Byte alignment. Nothing should have changed for win32.

Show quoted text 19 lines
Whether the stack of is manipulated with push/pop or is reserved in one go shouldn't matter for SEH as the original stack pointer is stored in EBP anyway and thus can be restored (or stored on the stack in nested calls and can be restored from there as it's one of the first actions done in the prologue). Regards, Sven > ---------- _______________________________________________ fpc-devel maillist - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email