aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://github.com/aboutcode-org/scancode-toolkit/releases/
2.07k stars 536 forks source link

ScanCode times out on scanning a file with very long lines #3913

Open georg-eckert-zeiss opened 1 week ago

georg-eckert-zeiss commented 1 week ago

Describe the bug

ScanCode times out on scanning the file https://github.com/ElinamLLC/SharpVectors/blob/master/Source/SharpVectorModel/Compressions/Brotli/Dictionary.cs which contains exceedingly long strings.

I cannot see another reason why this might happen.

To Reproduce

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <RootNamespace>ort-test</RootNamespace>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="SharpVectors.Reloaded" Version="1.8.1" />
  </ItemGroup>

</Project>

Steps to reproduce the behavior:

  1. use the given minimal C# project example
  2. scan
  3. See error

Expected behavior

Scan runs successfully.

Console / log output

NuGet:SharpVectors:Reloaded:1.8.1
ERROR: Timeout after 300 seconds while scanning file 'Source/SharpVectorModel/Compressions/Brotli/Dictionary.cs'.

Environment

PS: See the related issue for ORT.