Sign in Join

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

Mailing lists / fpc-devel / 2011-12

Bug 18702

2 messages · 1 person · –

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,

Seems like it that bug 18702 has nothing to do with my changes to the stack-balancing code, and that nested function proc's never functioned well on Windows.

The problem is that pop_parasize() is used to pop the stack-frame pointer form the stack. But on 32-bit Windows, pop_parasize() has some code to ensure that the funcret pointer is removed from the stack by the caller. This is not applicable to the situation where only the stack-frame pointer has to be popped from the stack.

A possible solution is attached, but I didn't commit it yet because I'm nut sure if it is 'allowed' to use a 'target_info.system = system_i386_win32' condition in ncgcal.pas. Other solutions could be to add a parameter to pop_parasize or to add something like pop_funcret_parasize().

Thoughts?

Joost.

Reply by email

Joost van der Sluis
to Joost van der Sluis

I saw some activity on this bug, so I thought it would be a good idea to draw some attention to this message.

Joost van der Sluis wrote 21 lines
Hi all, Seems like it that bug 18702 has nothing to do with my changes to the stack-balancing code, and that nested function proc's never functioned well on Windows. The problem is that pop_parasize() is used to pop the stack-frame pointer form the stack. But on 32-bit Windows, pop_parasize() has some code to ensure that the funcret pointer is removed from the stack by the caller. This is not applicable to the situation where only the stack-frame pointer has to be popped from the stack. A possible solution is attached, but I didn't commit it yet because I'm nut sure if it is 'allowed' to use a 'target_info.system = system_i386_win32' condition in ncgcal.pas. Other solutions could be to add a parameter to pop_parasize or to add something like pop_funcret_parasize(). Thoughts? Joost.

Reply by email