delphimvcframework icon indicating copy to clipboard operation
delphimvcframework copied to clipboard

TMVCActionParamCacheItem.Match sometimes raise Index out of bounds or Succesful match required exception

Open delphicz opened this issue 5 months ago • 1 comments

Under heavy load for testing with same request sometimes function TMVCActionParamCacheItem.Match fail with strange exception Index out of bounds (49) or Succesful match required

I don't know if is problem of security software in our infrastructure or bug in TRegEx under parallel execution. I wrote this for information, if someone else get same problem.

I know this, because tracked exception and log exeption

function TMVCActionParamCacheItem.Match(const Value: String): TMatch;
begin
  try
    Result := fRegEx.Match(Value);
  except
    on E: Exception do
    begin
             gLogE('TMVCActionParamCacheItem.Match:'+E.Message+','+Value);
             raise;
    end; 
  end;  
end;

delphicz avatar May 26 '25 19:05 delphicz

Can you reproduce the issue with a minimal and self contained example using oha (https://github.com/hatoo/oha) or ab.exe?

danieleteti avatar Jun 03 '25 14:06 danieleteti