Sign in Join

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

Mailing lists / lazarus / 2011-09

arm-linux crash(es)

11 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

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

Henry Vermaak

Hi Lazarus devs

I'm getting a couple of crashes under arm-linux, which I think are mostly related to unaligned access. There's a lot of code related to typinfo that does pointer arithmetic that will definitely break on ARM processors. I think some of the code probably pre-dates some of the helper functions in typinfo, but the functions in typinfo are written with aligned access in mind. I've fixed a particular crash as shown in the attached patch. Is this acceptable? If so, I can try and fix more of this code.

Thanks

Henry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proplist2.patch
Type: text/x-diff
Size: 5151 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110929/d9de7c9d/attachment.bin>

Reply by email

Vincent Snijders
to Henry Vermaak

2011/9/29 Henry Vermaak :

Show quoted text 9 lines
Hi Lazarus devs I'm getting a couple of crashes under arm-linux, which I think are mostly related to unaligned access. ?There's a lot of code related to typinfo that does pointer arithmetic that will definitely break on ARM processors. ?I think some of the code probably pre-dates some of the helper functions in typinfo, but the functions in typinfo are written with aligned access in mind. ?I've fixed a particular crash as shown in the attached patch. ?Is this acceptable? ?If so, I can try and fix more of this code.

See also:
http://bugs.freepascal.org/view.php?id=19109

Vincent

Reply by email

Henry Vermaak
to Vincent Snijders
Vincent Snijders wrote 13 lines
2011/9/29 Henry Vermaak : > Hi Lazarus devs > > I'm getting a couple of crashes under arm-linux, which I think are mostly > related to unaligned access. ?There's a lot of code related to typinfo that > does pointer arithmetic that will definitely break on ARM processors. ?I > think some of the code probably pre-dates some of the helper functions in > typinfo, but the functions in typinfo are written with aligned access in > mind. ?I've fixed a particular crash as shown in the attached patch. ?Is > this acceptable? ?If so, I can try and fix more of this code. See also: http://bugs.freepascal.org/view.php?id=19109

Hmm, I'll take a look. Is anyone planning to merge any of this?

Henry

Reply by email

Mark Morgan Lloyd
to Henry Vermaak
Henry Vermaak wrote 15 lines
On 29 September 2011 18:09, Vincent Snijders wrote: > 2011/9/29 Henry Vermaak : >> Hi Lazarus devs >> >> I'm getting a couple of crashes under arm-linux, which I think are mostly >> related to unaligned access. There's a lot of code related to typinfo that >> does pointer arithmetic that will definitely break on ARM processors. I >> think some of the code probably pre-dates some of the helper functions in >> typinfo, but the functions in typinfo are written with aligned access in >> mind. I've fixed a particular crash as shown in the attached patch. Is >> this acceptable? If so, I can try and fix more of this code. > See also: > http://bugs.freepascal.org/view.php?id=19109 Hmm, I'll take a look. Is anyone planning to merge any of this?

I've been using Ludo's align_all.diff for several weeks on ARM (Linux) and SPARC (Linux, Solaris). I'll try a clean trunk when I have time, to see if the additional file Felipe merged yesterday (r18900) is adequate.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Ludo Brands
to Mark Morgan Lloyd
Show quoted text 7 lines
I've been using Ludo's align_all.diff for several weeks on ARM (Linux) and SPARC (Linux, Solaris). I'll try a clean trunk when I have time, to see if the additional file Felipe merged yesterday (r18900) is adequate.

Mark,

Felipe replaced the fpc regex routines with TRegExpr by Andrey V. Sorokin a month ago. Since this is the same code as used in synregexpr it had the same aligment problems. Felipe then used my patched version. So r18900 doesn't add anything new to lazarus.

Ludo

Reply by email

Marco van de Voort
to Ludo Brands
Ludo Brands wrote
Felipe replaced the fpc regex routines with TRegExpr by Andrey V. Sorokin a month ago. Since this is the same code as used in synregexpr it had the same aligment problems. Felipe then used my patched version. So r18900 doesn't add anything new to lazarus.

He added the Sorokin regexpr unit. The old one is still available as oldregexpr, which is a shell over the "regex" unit that also got some long overdue fixes the last months.

Reply by email

Mark Morgan Lloyd
to Ludo Brands: Felipe replaced the fpc regex routines with TRegExpr by Andrey V. Sorokin a month ago.…
Ludo Brands wrote 14 lines
> I've been using Ludo's align_all.diff for several weeks on > ARM (Linux) > and SPARC (Linux, Solaris). I'll try a clean trunk when I > have time, to > see if the additional file Felipe merged yesterday (r18900) > is adequate. > Mark, Felipe replaced the fpc regex routines with TRegExpr by Andrey V. Sorokin a month ago. Since this is the same code as used in synregexpr it had the same aligment problems. Felipe then used my patched version. So r18900 doesn't add anything new to lazarus.

I don't know where that revision came from. I can confirm that trunk (r32564) still needs (at least part of) align_all.diff on SPARC-Linux.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Felipe Monteiro de Carvalho
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
I don't know where that revision came from. I can confirm that trunk (r32564) still needs (at least part of) align_all.diff on SPARC-Linux.

I wrote in the bug report that I merged the fix to revision 18900 in Free Pascal. So it a revision from Free Pascal. I did not merge it to Lazarus, because it makes more sense to merge them all at once into Lazarus by an IDE developer (I develop mostly the LCL).

Felipe Monteiro de Carvalho

Reply by email

Mark Morgan Lloyd
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 9 lines
On Fri, Sep 30, 2011 at 1:42 PM, Mark Morgan Lloyd wrote: > I don't know where that revision came from. I can confirm that trunk > (r32564) still needs (at least part of) align_all.diff on SPARC-Linux. I wrote in the bug report that I merged the fix to revision 18900 in Free Pascal. So it a revision from Free Pascal. I did not merge it to Lazarus, because it makes more sense to merge them all at once into Lazarus by an IDE developer (I develop mostly the LCL).

Apologies- I was assuming I'd done something stupid :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Henry Vermaak: Hmm, I'll take a look. Is anyone planning to merge any of this? Henry
Show quoted text 16 lines
On 29 September 2011 18:09, Vincent Snijders wrote: > 2011/9/29 Henry Vermaak : >> Hi Lazarus devs >> >> I'm getting a couple of crashes under arm-linux, which I think are mostly >> related to unaligned access. ?There's a lot of code related to typinfo that >> does pointer arithmetic that will definitely break on ARM processors. ?I >> think some of the code probably pre-dates some of the helper functions in >> typinfo, but the functions in typinfo are written with aligned access in >> mind. ?I've fixed a particular crash as shown in the attached patch. ?Is >> this acceptable? ?If so, I can try and fix more of this code. > > See also: > http://bugs.freepascal.org/view.php?id=19109 Hmm, I'll take a look. Is anyone planning to merge any of this?

I merged them into trunk.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote
On Thu, 29 Sep 2011 21:21:18 +0100Henry Vermaak wrote: > On 29 September 2011 18:09, Vincent Snijders wrote:> > 2011/9/29 Henry Vermaak :> >> Hi Lazarus devs> >>> >> I'm getting a couple of crashes under arm-linux, which I think are mostly> >> related to unaligned access. There's a lot of code related to typinfo that> >> does pointer arithmetic that will definitely break on ARM processors. I> >> think some of the code probably pre-dates some of the helper functions in> >> typinfo, but the functions in typinfo are written with aligned access in> >> mind. I've fixed a particular crash as shown in the attached patch. Is> >> this acceptable? If so, I can try and fix more of this code.> >> > See also:> > http://bugs.freepascal.org/view.php?id=19109> > Hmm, I'll take a look. Is anyone planning to merge any of this? I merged them into trunk.

Looks good at r32573 on SPARC/Linux.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email