Sign in Join

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

Mailing lists / fpc-devel / 2020-02

Stack misalignment?

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

C Western

FPC version r44191 seems to be causing problems for a lazarus application – it crashes on exit, with a segmentation fault. This is x86_64 on linux, with the gtk2 widget set, and the crash occurs in one of the system gtk c library routines. If I am interpreting the gdb information correctly the issue seems to be a misaligned stack – the faulting instruction is MOVAPS involving a stack location. A little more probing with gdb suggests the misalignment is introduced in the InternalExit routine in the rtl.

I may not have diagnosed the underlying error correctly, but the crash after r44191 is certainly real – any thoughts on this? Any other tests I could try?

Colin

Reply by email

Florian Klämpfl
to C Western
C Western wrote 9 lines
FPC version r44191 seems to be causing problems for a lazarus application – it crashes on exit, with a segmentation fault. This is x86_64 on linux, with the gtk2 widget set, and the crash occurs in one of the system gtk c library routines. If I am interpreting the gdb information correctly the issue seems to be a misaligned stack – the faulting instruction is MOVAPS involving a stack location. A little more probing with gdb suggests the misalignment is introduced in the InternalExit routine in the rtl.

I think I have an idea what's wrong. I'll look into it.

Reply by email

C Western
to Florian Klämpfl
Florian Klämpfl wrote 8 lines
Am 29.02.20 um 12:12 schrieb C Western: > I may not have diagnosed the underlying error correctly, but the > crash after r44191 is certainly real – any thoughts on this? Any > other tests I could try? > Do you use -O4?

Yes

Thank uou for

Reply by email

Florian Klämpfl
to C Western
C Western wrote 12 lines
On 01/03/2020 08:45, Florian Klämpfl wrote: > Am 29.02.20 um 12:12 schrieb C Western: >> I may not have diagnosed the underlying error correctly, but the >> crash after r44191 is certainly real – any thoughts on this? Any >> other tests I could try? >> > > Do you use -O4? > Yes Thank uou for try if r44251 fixes it.

Reply by email

C Western
to Florian Klämpfl
Florian Klämpfl wrote 15 lines
Am 01.03.20 um 10:24 schrieb C Western: > On 01/03/2020 08:45, Florian Klämpfl wrote: >> Am 29.02.20 um 12:12 schrieb C Western: >>> I may not have diagnosed the underlying error correctly, but the >>> crash after r44191 is certainly real – any thoughts on this? Any >>> other tests I could try? >>> >> >> Do you use -O4? >> > Yes > > Thank uou for looking at this. Please try if r44251 fixes it.

Yes!

Many thanks.

Colin

Reply by email