View Issue Details

IDProjectCategoryView StatusLast Update
0037625FPCCompilerpublic2020-12-31 12:07
ReporterCudaText man_ Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
OSUbuntu 20 x64 
Product Version3.3.1 
Summary0037625: SigSegv in TRegExpr fork
DescriptionThis demo
https://github.com/Alexey-T/ATSynEdit/tree/master/app/demo_editor
crashes inside function
function TRegExpr.regnext(p: PRegExprChar): PRegExprChar;
// dig the "next" pointer out of a node
var
  offset: TRENextOff;
begin
  if p = @regdummy then
  begin
    Result := nil;
    Exit;
  end;
  offset := PRENextOff(AlignToPtr(p + REOpSz))^; // here

it works Ok with FPC 3.2.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

CudaText man_

2020-08-23 00:14

reporter   ~0125087

The file name: atsynedit/atsynedit_regexpr.pas.

zoltanleo

2020-12-27 22:08

reporter   ~0127841

May I know if there are any prospects for solving this issue?

Marco van de Voort

2020-12-31 10:25

manager   ~0127965

As the bugreport is some external fork (why is it here?) I don't know the prospects. The report is a bit thin to be about a compiler bug.

If I look at the function facevalue, it doesn't check for p=nil, while it does check for assigned(p). If for some reason the forked version sometimes resets to nil (or some other value) and not @regdummy crashes are bound to happen.

ravi dion

2020-12-31 11:25

reporter   ~0127966

Maybe include the original TRegExpr from Github?
Doesn't make sense to "maintain" two versions while the FPC on is barely maintained and the Github one got a lot of nice features recently (fixes e.g. 0029756) and does not have any known bugs.

ravi dion

2020-12-31 11:26

reporter   ~0127967

FPC should focus on Compiler/RTL and not on 3rd party packages which are well maintained by others - just include their recent work

Marco van de Voort

2020-12-31 12:07

manager   ~0127969

Ravi dion: please use maillists and forum for discussion.

Issue History

Date Modified Username Field Change
2020-08-23 00:10 CudaText man_ New Issue
2020-08-23 00:14 CudaText man_ Note Added: 0125087
2020-12-27 22:08 zoltanleo Note Added: 0127841
2020-12-31 10:25 Marco van de Voort Note Added: 0127965
2020-12-31 11:25 ravi dion Note Added: 0127966
2020-12-31 11:26 ravi dion Note Added: 0127967
2020-12-31 12:07 Marco van de Voort Note Added: 0127969