#1 2019-05-22 23:20:13

ertank
Member
Registered: 2016-03-16
Posts: 168

SIGSEGV - SynCommons, fpc 3.2

Hello,

I am using Lazarus 2.0.3, (fixes 2.0) revision 61198, fpc 3.2.0-beta-r42099 (fixes 3.2), mORMot commit 1.18.5222 OS is Raspbian. Everything is updated and upgraded as of today.

I have a SIGSEGV in SynCommons.pas and remark says

    // FPC compatibility: if you have a GPF here at startup, your 3.1 trunk
    // revision seems older than June 2016
    // -> enable HASDIRECTTYPEINFO conditional below $ifdef VER3_1 in Synopse.inc
    // or in your project's options

One thing I would like to understand is my fpc version is 3.2 and newer than June 2016. So, why do I still get a segfault?

Also, I never enabled a conditional in my project's options. I very much appreciate menus to follow here.

Thanks & regards,
Ertan

Offline

#2 2019-05-23 06:57:26

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: SIGSEGV - SynCommons, fpc 3.2

Confirmed.

Reproduceable on ARM.
Not reproduceable on Windows.

Will look into it.

Offline

#3 2019-05-23 09:00:25

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: SIGSEGV - SynCommons, fpc 3.2

Would you mind trying this.

In SynFPCTypInfo, line 182.
Replace
Dec(PtrUInt(result),SizeOf(pointer));
with
Dec(PtrUInt(result),2*SizeOf(pointer));

Offline

#4 2019-05-23 09:55:30

ertank
Member
Registered: 2016-03-16
Posts: 168

Re: SIGSEGV - SynCommons, fpc 3.2

That seemingly working at first glance. But, I need to do some more test as I still get SIGSEGV further in the application. It just doesn't stop in any code line.
Will report in here once I figure what else is going wrong.

Offline

#5 2019-05-25 07:40:45

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: SIGSEGV - SynCommons, fpc 3.2

Hi Ab,

I have created a pull with some changes for Linux ARM.
Please review !

https://github.com/synopse/mORMot/pull/203

Offline

#6 2019-05-26 21:37:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: SIGSEGV - SynCommons, fpc 3.2

I will look into it ASAP.

Online

#7 2019-05-28 08:04:18

AOG
Member
Registered: 2014-02-24
Posts: 490

Re: SIGSEGV - SynCommons, fpc 3.2

Hi Ab,

Another small (but very necessary) ARM fix. See comment.

https://github.com/synopse/mORMot/pull/206

Offline

#8 2019-05-28 15:26:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: SIGSEGV - SynCommons, fpc 3.2

I have merged it, with a minor change: it doesn't hurt to use the local d variable even on non ARM target - it will be a transient register in asm.

Online

Board footer

Powered by FluxBB